Deploying a React SPA website to a new domain (.ua) on an existing VPS
There is a ready React SPA site on a VPS. A copy needs to be deployed on a Ukrainian domain (the domain will be provided).
What needs to be done:
- Connect to the VPS via SSH (data will be provided)
- Copy the build/source files of the site to the new domain
- Configure Nginx — a new virtual host for the .ua domain
- Obtain and install an SSL certificate (Let's Encrypt)
- Check the proper functioning of the site at the new address
-
Hello, Vladlen.
The task is clear, I can do it today in a couple of hours. Basic scheme: SSH, separate vhost in Nginx with server_name for .ua, certbot for SSL with auto-renewal, try_files $uri /index.html for SPA (otherwise client routing throws a 404 on refresh).
Two points to consider right away:
There may be hardcoded URLs in the build for the old domain (API endpoint, base URL, OAuth callbacks). If the sources are on the server, we will rebuild with the correct env. If only the ready dist is available, I will check if it won't cause issues.
Let's Encrypt validates via DNS, so the A record for the new domain needs to propagate in time. If it was just changed, we should allow 15-30 minutes for propagation.
Questions:
… Are the sources with Node on the VPS or just the ready dist?
Is this a complete copy for a different audience or do we need redirects from the old domain?
Ready to start as soon as SSH is available and DNS resolves.
-
Hello! I am ready to take on your project and will complete it urgently. I have extensive experience with similar tasks, so there will be no difficulties. If I have piqued your interest, feel free to write; I am happy to collaborate!
-
Good afternoon! Setting up Nginx + Let's Encrypt for a React SPA is a standard task, I will do it today.
-
1074 5 0 Hello, I am ready to take on the work. The price will be 1500 UAH. Write to me, I will be happy to cooperate :)
-
248 1 0 Good day, I am ready to complete your task. I have experience deploying various websites on VPS. I will do everything quickly and efficiently.
-
242 Hello! I am ready to discuss the tasks and details of this project in more detail.
-
990 22 1 1 Good day! I will deploy the website on a VPS, configure nginx, and attach the required domain to the site. Feel free to reach out. If you have any questions, please write as well.
-
2223 36 0 Good evening. I have repeatedly completed similar tasks. I will do it quickly and efficiently, I can start right now. Feel free to contact me!
-
2116 20 0 The task is clear — a copy of the working React SPA on a new .ua domain on the same VPS, with a separate Nginx vhost and SSL.
A standard scheme that I have done dozens of times. Connect via SSH, copy the build to /var/www/ for the new domain (or git clone + npm run build if the source code is available on the VPS), create a new virtual host in /etc/nginx/sites-available/ for the .ua name with the correct root and server_name, use certbot --nginx for the Let's Encrypt certificate with auto-renewal via cron, check the website's operation over HTTPS and redirect http to https.
One nuance regarding SPA that is often overlooked: in the location block, you need try_files $uri $uri/ /index.html, otherwise a direct access to any route other than the root will give a 404 (routing is client-side). I will keep this in mind by default.
After deployment — check via curl with my headers and through a browser from another network to ensure that DNS has resolved and the certificate is valid.
Linux/Ubuntu Server 5+ years of production experience, Nginx as the main reverse proxy for most of my projects, I have configured Let's Encrypt auto-renewal dozens of times.
…
I am ready to start on the day of the request. With SSH access and an A record for .ua pointing to the same IP — I will complete it in a couple of hours.
To clarify: is there one main React site running on the VPS or are there several, and what web server is already set up — Nginx, Apache, Caddy?
-
427 Good day, I will do this for you in hours, I have relevant experience
https://mksscryertower.quest/Curriculum%20Vitae%20of%20Klimenko%20Maxim%20Sergievich.html
-
1370 67 0 I will do it. I have a lot of experience. Write to me, I will help promptly..................
-
776 11 2 Good day, I will complete your task, I have experience, for discussion please write in private messages.
-
3306 180 0 Good day. I am ready to complete your task. Write to me, we will discuss. Thank you.
-
94346 1269 1 10 Hello. I have extensive experience with React. I am ready to deploy the frontend.
-
178 Hello, I will do it today ……………………………………………………………………………………………
-
573 5 0 Hello, I worked on deploying a React SPA for a medical clinic on 3 different domains with Nginx and SSL configuration - experience with Ukrainian .ua domains and VPS.
Will it be necessary to set up redirects from the main site to the Ukrainian domain, or will they operate independently?
I suggest we get in touch; I will provide you with free technical consultation and we can create a development plan + I will tell you about my team!
Current freelance projects in the category Linux & Unix
Deployment of a Ruby on Rails project on VPS + Inbound Email RoutingNeed help deploying a platform for automating requests for public information (based on the open-source engine Alaveteli). The project works as a mail router: it generates unique email addresses for each request, sends them to government agencies, and receives responses back to… DevOps, Linux & Unix ∙ 9 days 23 hours back ∙ 11 proposals |