Skip to content

Instantly share code, notes, and snippets.

@lolmaus
Created September 16, 2011 13:29
Show Gist options
  • Save lolmaus/1222134 to your computer and use it in GitHub Desktop.
Save lolmaus/1222134 to your computer and use it in GitHub Desktop.
server {
server_name wiki.domain.tld;
root /var/www/dokuwiki;
location / {
index doku.php;
try_files $uri $uri/ @dokuwiki;
}
location @dokuwiki {
rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
rewrite ^/(.*) /doku.php?id=$1 last;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/tmp/phpcgi.socket;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment