webserver - Nginx Wild Card Domains -
i have a
name domain setup on nginx, have wildcard dns setup on digital ocean.
i main domain point is: /usr/share/nginx/html/mission13.io
i wildcard domains point respective folders:
/usr/share/nginx/html/sub1.mission13.io
/usr/share/nginx/html/sub2.mission13.io
/usr/share/nginx/html/sub3.mission13.io
here have, not sure them point proper location. can change that?
server{ listen 80; root /usr/share/nginx/html/mission13.io; index index.php index.html index.htm; server_name mission13.io www.mission13.io *.mission13.io; location / { try_files $uri $uri/ /index.html; } include /usr/share/nginx/conf/mission13.io.conf; location ~ \.php$ { fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; fastcgi_param script_filename $document_root$fastcgi_script_name; include fastcgi_params; } }
another way please change server name _
search folder host name inside root /usr/share/nginx/html/
directory.so,your directory looks clean
server{ listen 80; root /usr/share/nginx/html; index index.php index.html index.htm; server_name _; location / { try_files $uri $uri/ /index.html; } include /usr/share/nginx/conf/mission13.io.conf; location ~ \.php$ { fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; fastcgi_param script_filename $document_root$fastcgi_script_name; include fastcgi_params; } }
Comments
Post a Comment