I have followed the guide on https://www.digitalocean.com/community/articles/how-to-set-up-nginx-virtual-hosts-server-blocks-on-ubuntu-12-04-lts--3 . For one virtual host, it works correctly. But when I've tried to add the 2nd, the new /etc/nginx/sites/available/ config file has not been recognized by nginx (I'm getting the content from the other domain). Somehow, if I remove the config file for the first host I created, the new one starts working. So I suppose there's a conflict between both.
Both sites-available config files have the same structure:
listen 80; ## listen for ipv4; this line is default and implied
#listen [::]:80 default_server ipv6only=on; ## listen for ipv6
index index.html index.htm;
# Make site accessible from http://localhost/
Any suggestion please?
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.