Created
February 5, 2014 09:51
-
-
Save vicendominguez/8820321 to your computer and use it in GitHub Desktop.
Dokuwiki + Nginx config file (CentOS 6.4)
This file contains hidden or 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 { | |
server_name dokuwiki.domain.com; | |
root /var/www/dokuwiki; | |
location / { | |
index doku.php; | |
try_files $uri $uri/ @dokuwiki; | |
} | |
location ^~ /conf/ { return 403; } | |
location ^~ /data/ { return 403; } | |
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$ { | |
if (!-f $request_filename) { return 404; } | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_pass 127.0.0.1:9000; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment