Question

502 Error when following tutorial

Posted November 9, 2019 287 views
Nginx

Hi, I have followed this tutorial exactly: https://medium.com/@mixpeal/simplest-way-to-deploy-reactjs-web-app-to-digital-ocean-to-production-adfb9f1667ed

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 'harrybilney.co.uk’

Cheers!

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.

×
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.

https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-18-04

(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:

https://www.digitalocean.com/community/tags/react?type=tutorials

Let me know if you have any questions.

Regards,
Alex

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.
Submit an Answer