'Nginx server doesn't redirect to index.html

Situation

I have a Nginx web server with given domain name. I have been granted with SSH credentials, which redirects me to /home/my_name. There I upload all the necessary files (react project) but when I refresh domain nothing happens.

Problem

As I looked out I should change /etc/nginx/nginx.conf file, but as it turns out I don't have permissions. The root redirects to /usr/share/nginx/html

What I have tried

  1. With sudo nano command tried to change /etc/nginx/available-sites/default root path. Nothing happened.
  2. Entering sudo su unzipped project files into /usr/share/nginx/html. It worked, but in my react project I couldn't access $_POST. There was this error 405 Method Not Allowed.

I am desperate on this one, so please any tips would be awesome.



Solution 1:[1]

Problem was I didn't restart nginx server after saving /etc/nginx/available-sites/default Restart command - systemctl restart nginx

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Edvards Krickis