certbot/certbot-compatibility-test/nginx/nginx-roundtrip-testdata/pmwiki/nginx.conf
2016-07-11 13:58:21 -07:00

39 lines
1.1 KiB
Nginx Configuration File

server {
server_name wiki.example.com;
root /srv/www/pmwiki/example.com/wiki/public;
index pmwiki.php;
location ~ ^/(cookbook|local|scripts|wiki.d|wikilib.d) {
deny all;
}
location / {
try_files $uri $uri/ @pmwiki;
}
location @pmwiki {
rewrite ^/(.*) /pmwiki.php?n=$1;
}
## php configuration using unix sockets.
location ~ \.php$ {
include /etc/nginx/fastcgi_params;
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
}
# cache configuration for most common files
location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
# Some basic cache-control for static files to be sent to the browser
expires max;
add_header Pragma public;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
}
# drop common log errors
location = /robots.txt { access_log off; log_not_found off; }
location = /favicon.ico { access_log off; log_not_found off; }
location ~ /\. { access_log off; log_not_found off; deny all; }
location ~ ~$ { access_log off; log_not_found off; deny all; }
}