Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

nginx index.html does not update after modification

Tags:

nginx

Sorry for noob question, I suck at Ubuntu.

I have just installed nginx in a Ubuntu server with:

sudo apt-get update
sudo apt-get -y install nginx

It successfully built. I'm trying to change the index page, so I have modified my /usr/share/nginx/html/index.html, and then tried all of these:

sudo service nginx stop
sudo service nginx start
sudo service nginx restart

But when I refresh the root page on my browser it still shows the old page.

This is what the index.html looks like:
enter image description here

I have checked my /etc/nginx/nginx.conf, but don't find anything particular there.

What could I be missing?

like image 258
Amit Kohli Avatar asked Nov 15 '16 17:11

Amit Kohli


2 Answers

If you had checked vhost, you knowned, root directory is /var/www/html...

vhost is in /etc/nginx/sites-available and /etc/nginx/sites-enabled (sites-enabled is symlink).

like image 192
Przemysław Jagielski Avatar answered Nov 18 '22 06:11

Przemysław Jagielski


The correct configuration file for NGINX on Debian is :

/var/www/html/index.nginx-debian.html

If you update this file, the changes will be reflected immediately, without a start/stop or restart.

sudo service nginx stop
sudo service nginx start
sudo service nginx restart
like image 27
Jai Avatar answered Nov 18 '22 06:11

Jai