Answer the question
In order to leave comments, you need to log in
How to upload a website to reg.ru hosting?
I have a full stack project in react and node. How can I upload it to reg.ru hosting? I will be grateful
Answer the question
In order to leave comments, you need to log in
If this is their shared hosting, then no way, there is php-python-perl, but not node.js.
If their VPS, and such a question arises, hire an admin to set up the environment and deploy the project.
Hey! It won't work on regular hosting, you need to have a server - VDS, VPS... I'll write on the example of the timeweb: You rent a server with some OS, for example, ubuntu. It should be nginx, not apache! After successful installation, upload our project to some directory.
After that, we need to register our project in the configuration file, I personally have it at this address:
/etc/nginx/sites-available/hello-world.conf
Here we add this to the code:
# Делаете сервер вот так. После этого по нужному url будет отображаться Ваш проект без порта (:3000 к примеру)
server {
listen 80;
listen [::]:80;
server_name твой-сайт.ру;
client_max_body_size 100M;
location / {
proxy_pass http://localhost:8080; #Это порт, на котором работает Ваш проект
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question