Advertisement
vicendominguez

Dokuwiki + Nginx config file (CentOS 6.4)

Sep 26th, 2013
429
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. server {
  2. server_name dokuwiki.domain.com;
  3. root /var/www/dokuwiki;
  4.  
  5. location / {
  6. index doku.php;
  7. try_files $uri $uri/ @dokuwiki;
  8. }
  9.  
  10. location ^~ /conf/ { return 403; }
  11. location ^~ /data/ { return 403; }
  12.  
  13. location @dokuwiki {
  14. rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
  15. rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
  16. rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
  17. rewrite ^/(.*) /doku.php?id=$1 last;
  18. }
  19.  
  20. location ~ \.php$ {
  21. if (!-f $request_filename) { return 404; }
  22. include fastcgi_params;
  23. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  24. fastcgi_pass 127.0.0.1:9000;
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement