Domain directs to nginx default page instead of my root -


here server setup

/etc/nginx/sites-available/example.com

server {     listen 80;     server_name example.com www.example.com      root /root/sites/example.com;     index index.html; } server {     listen 80;     server_name subdomain.example.com www.subdomain.example.com;      location /static {         alias /var/www/subdomain.example.com/static;     }     location / {         proxy_set_header host $host;         proxy_pass http://127.0.0.1:5000;     } } 

subdomain.example.com working fine. when go example.com show nginx default welcome page.

note: deleted /etc/nginx/sites-enabled/default

need fix it.

you missed ; after server name.

should be: server_name example.com www.example.com;


Comments

Popular posts from this blog

javascript - How to synchronize the Three.js and HTML/SVG coordinate systems (especially w.r.t. the y-axis)? -

javascript - How do I find how many occurences are there of a highlighted string, and which occurence is it? -

java - Reading data from multiple zip files and combining them to one -