certbot/certbot-compatibility-test/nginx/nginx-roundtrip-testdata/wordpress-caching/total-cache.conf
2016-07-11 13:58:21 -07:00

41 lines
1.3 KiB
Text

server {
listen 80;
server_name kbeezie.com www.kbeezie.com;
root html/kbeezie.com;
access_log logs/kbeezie.access.log;
error_log logs/kbeezie.error.log;
# Simply using try_files, tests the request uri against a file, then folder
# then if neither can be found, the request is sent to index.php
# this is a lot simpler than the .htaccess method of rewriting permalinks
location / {
try_files $uri $uri/ /index.php;
}
# Normally you do not need this if you are not using any error_page directive
# but having it off allows Wordpress to return it's own error page
# rather than the plain Nginx screen
fastcgi_intercept_errors off;
# Caching the typical static files such as css, js, jpg, png and so forth
# helps in telling the browser they can cache the content
location ~* \.(ico|css|js|gif|jpe?g|png)$ {
expires max;
add_header Pragma public;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
}
# I like to place my php stuff into it's own file
# see http://kbeezie.com/view/nginx/ for more information
include php.conf;
# We don't really need to log favicon requests
location = /favicon.ico { access_log off; log_not_found off; }
# We don't want to allow the browsers to see .hidden linux/unix files
location ~ /\. { deny all; access_log off; log_not_found off; }
}