Skip to content

Instantly share code, notes, and snippets.

@Eugeny
Created October 28, 2011 20:00
Show Gist options
  • Save Eugeny/1323395 to your computer and use it in GitHub Desktop.
Save Eugeny/1323395 to your computer and use it in GitHub Desktop.
server {
server_name wiki.ajenti.org;
access_log /var/log/nginx/wiki.access.log;
location / {
root /srv/wiki;
index index.html index.htm index.php;
rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1;
rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1;
rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2;
if (!-f $request_filename) {
rewrite (.*) /doku.php?id=$1;
}
}
#error_page 404 /404.html;
location ~ \.php$ {
fastcgi_pass unix:///srv/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /srv/wiki$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment