Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80;
- listen [::]:80;
- server_name wiki.niyama;
- # Maximum file upload size is 4MB - change accordingly if needed
- client_max_body_size 4M;
- client_body_buffer_size 128k;
- root /usr/share/nginx/webapps/dokuwiki;
- index doku.php;
- #Remember to comment the below out when you're installing DokuWiki, and uncomment it when you're done.
- #location ~ /(data/|conf/|bin/|inc/|install.php) { deny all; } # secure Dokuwiki
- location ~^/\.ht { deny all; } # also secure the Apache .htaccess files
- location @dokuwiki {
- #rewrites "doku.php/" out of the URLs if you set the userewrite setting to .htaccess in dokuwiki config page
- 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&$args last;
- }
- location / { try_files $uri $uri/ @dokuwiki; }
- location ~ \.php$ {
- try_files $uri =404;
- fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
- fastcgi_index index.php;
- include fastcgi.conf;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement