A
A
Artem Vladilenko2021-05-25 22:11:03
Node.js
Artem Vladilenko, 2021-05-25 22:11:03

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

2 answer(s)
B
Boris Syomov, 2021-05-25
@kotomyava

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.

D
Denis Shcherbina, 2021-05-26
@Denis_maker

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;    
  }
}

After these manipulations, it is important to attach the IP address of the server (Record "A") to the domain name. In general, the support guys help to launch the whole thing, the main thing is to download the source code and write to support)
Well, that's all in principle. Run the project - run the same as locally. I'm using pm2 to keep it running in the "background".
putty - a program for remote connection to the server and control it through the console
FileZilla - a program to send and download files to the server.
If my answer is what was needed, check off you)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question