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
Post a Comment