502 Error when following tutorial

Posted November 9, 2019 434 views

Hi, I have followed this tutorial exactly:

but I get a 502 error before I’ve even cloned my git to my server. It happened after I edited the ‘location’ bit in ’/etc/nginx/sites-avaliable/default’

Can anyone see where I went wrong? My site is '’


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.

Submit an Answer
1 answer

Hello, @harrybilney01

I assume you mean that you’ve encountered a 502 error after installing Nginx on your droplet? My suggestion will be to follow one of our tutorials for installing Nginx on Digital Ocean droplet and then continue with the rest of the steps in the tutorial you’ve posted.

(If you’re not using Ubuntu 18.04 you an switch this via the blue drop-down menu and select the distribution that you use)

You can also see the rest of our tutorials about React in our community:

Let me know if you have any questions.


by Justin Ellingwood
by Kathleen Juell
Nginx is one of the most popular web servers in the world and is responsible for hosting some of the largest and highest-traffic sites on the internet. It is more resource-friendly than Apache in most cases and can be used as a web server or reverse proxy. In this guide, we'll discuss how to get Nginx installed on your Ubuntu 18.04 server.