Last active
October 31, 2016 23:10
-
-
Save andydvsn/db33967cc229d13190a4bef86d7a54a9 to your computer and use it in GitHub Desktop.
This file contains 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; | |
listen [::]:80; | |
server_name YOUR.HOSTNAME.HERE; | |
root /srv/wiki; | |
index index.php | |
client_max_body_size 5m; | |
client_body_timeout 60; | |
location / { | |
try_files $uri $uri/ @rewrite; | |
} | |
location @rewrite { | |
rewrite ^/(.*)$ /index.php?title=$1&$args; | |
} | |
location ^~ /maintenance/ { | |
return 403; | |
} | |
location ~ \.php$ { | |
include fastcgi_params; | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
} | |
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { | |
try_files $uri /index.php; | |
expires max; | |
log_not_found off; | |
} | |
location = /_.gif { | |
expires max; | |
empty_gif; | |
} | |
location ^~ /cache/ { | |
deny all; | |
} | |
location /dumps { | |
root /arv/wiki/local; | |
autoindex on; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment