Created
August 30, 2020 23:11
-
-
Save chrisdel101/2c4c1af0604526ed4628c1d8b6b74f1f to your computer and use it in GitHub Desktop.
Nginx Ex
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 characters
server { | |
listen 80 default_server; | |
root /var/www/wisdompetmed.local; | |
server_name wisdompetmed.local www.wisdompetmed.local; | |
index index.html index.htm index.php; | |
access_log /var/log/nginx/wisdompetmed.local.access.log; | |
error_log /var/log/nginx/wisdompetmed.local.error.log; | |
location / { | |
# First attempt to serve request as file, then | |
# as directory, then fall back to displaying a 404. | |
try_files $uri $uri/ =404; | |
} | |
location /test/ { | |
try_files /var/www/test/ /var/www/test/index.html; | |
} | |
location /images/ { | |
# Allow the contents of the /image folder to be listed | |
access_log /var/log/nginx/wisdompetmed.local.images.access.log; | |
error_log /var/log/nginx/wisdompetmed.local.images.error.log; | |
autoindex on; | |
} | |
error_page 404 /404.html; | |
location = /404.html { | |
internal; | |
} | |
error_page 500 502 503 504 /50x.html; | |
location = /50x.html { | |
internal; | |
} | |
location = /500 { | |
fastcgi_pass unix:/this/will/fail; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment