I have a droplet running nginx on ubuntu 18.04 and have followed this tutorial for setting up a server block: https://www.digitalocean.com/community/tutorials/how-to-set-up-nginx-server-blocks-virtual-hosts-on-ubuntu-16-04. So now I have mydomain set up in /var/www/mydomain/ with an html folder and index.html file that works perfectly fine. But now I want to be able to deploy static pages built from react. So I created a folder called /projects/ in /var/www/mydomain/ and then placed the production build within. Now I go into the /etc/nginx/sites-available/mydomain and add
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $100 of credit to try our products over 60 days!