Last active
December 1, 2023 08:20
-
-
Save fideloper/9477321 to your computer and use it in GitHub Desktop.
Revisions
-
fideloper revised this gist
Dec 16, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -18,7 +18,7 @@ server { charset utf-8; location / { try_files $uri $uri/ =404; } # Don't log favicon.ico nor robots.txt attempts -
fideloper revised this gist
Mar 11, 2014 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,16 +1,16 @@ server { # Redirect any subdomain to the root domain # to be captured by next server block server_name *.example.com; return 301 $scheme://example.com$request_uri; } server { root /var/www; index index.html index.htm; # Make site accessible from http://example.com server_name example.com access_log /var/log/nginx/example.com-access.log; error_log /var/log/nginx/example.com-error.log error; -
fideloper created this gist
Mar 11, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,34 @@ server { # Pass any subdomain to the "www" subdomain # to be captured by next server block server_name *.example.com; return 301 $scheme://www.example.com$request_uri; } server { root /var/www; index index.html index.htm; # Make site accessible from http://example.com server_name www.example.com access_log /var/log/nginx/example.com-access.log; error_log /var/log/nginx/example.com-error.log error; charset utf-8; location / { try_files \$uri \$uri/; } # Don't log favicon.ico nor robots.txt attempts location = /favicon.ico { log_not_found off; access_log off; } location = /robots.txt { log_not_found off; access_log off; } error_page 404 /error404.html # Deny .htaccess file access location ~ /\.ht { deny all; } }