My websites shows a black screen when the Domain name is entered but works off the IP address

April 12, 2019 284 views
DNS Deployment JavaScript Node.js Ubuntu 18.04

Hello everyone, I’ve followed through an article(Link at the bottom) to deploy my ReactJs app on Digital Ocean. I was able to configure everything and follow through to the end and see my web app up and running when I would punch in the IP address ( I then went on to configure my DNS records with my domain provider(SiteGround), once the wait for the DNS records had been done I went on to my website and I get a black screen. The errors I get in the inspector tools is a 403(forbidden). This is my first time using something like NGINX and I’m a bit stumbled here. I’ve gone on to read through a few different articles and have tried editing my sites-available and sites-enabled files a few times accordingly to each of the articles or docs I followed and I am yet to get past the black screen.

This is what my current sites-enabled/available file looks like:

server {
listen 80;

root /react-portfolio/;
if ($http_host != "") {
    rewrite ^$request_uri permanent;
# Server static files
location /static/ {
alias /root/react-portfolio/build/;
expires 365d;

location / {
    proxy_pass http://localhost:8080;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;


Article I had followed:

Be the first one to answer this question.