Why do I still see an Apache site on Nginx?
Even after you remove apache2 completely, you will still have its "default site" files sitting in /var/www/
. By default, Nginx will attempt to serve these or its own version of these files for sites it cannot otherwise match. You can see this all in /etc/nginx/sites-available/default
.
What you're seeing is by design, it was just unexpected.
To fix it, you can edit or remove the default site... Or alter the files in /var/www/
to better suit your needs. If you want rid of the default, you can delete /etc/nginx/sites-available/default
. It's just a symlink so if you want to restore it, you can with:
sudo ln -s /etc/nginx/sites-{available,enabled}/default
And remember to reload after making configuration changes:
sudo service nginx configtest # make sure the config is good before reloading!
sudo service nginx reload