Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- server_name pmwiki.lcl;
- root /var/www/pmwiki/pub;
- index index.php;
- location / {
- try_files $uri $uri/ @pmwiki;
- }
- location @pmwiki {
- rewrite ^/(.*) /index.php?n=$1;
- }
- # Secure PHP handling
- location ~ \.php$ {
- try_files $uri =404;
- fastcgi_pass unix:/var/run/php5-fpm.sock;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include fastcgi_params;
- }
- # Cache configuration for most common files
- location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
- 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; }
- }
Advertisement
Add Comment
Please, Sign In to add comment