Advertisement
kalitara

Untitled

Mar 18th, 2020
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. server {
  2. listen 80;
  3. listen [::]:80;
  4.  
  5. server_name wiki.niyama;
  6.  
  7. # Maximum file upload size is 4MB - change accordingly if needed
  8. client_max_body_size 4M;
  9. client_body_buffer_size 128k;
  10.  
  11. root /usr/share/nginx/webapps/dokuwiki;
  12. index doku.php;
  13.  
  14. #Remember to comment the below out when you're installing DokuWiki, and uncomment it when you're done.
  15. #location ~ /(data/|conf/|bin/|inc/|install.php) { deny all; } # secure Dokuwiki
  16.  
  17. location ~^/\.ht { deny all; } # also secure the Apache .htaccess files
  18.  
  19. location @dokuwiki {
  20. #rewrites "doku.php/" out of the URLs if you set the userewrite setting to .htaccess in dokuwiki config page
  21. rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
  22. rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
  23. rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
  24. rewrite ^/(.*) /doku.php?id=$1&$args last;
  25. }
  26.  
  27. location / { try_files $uri $uri/ @dokuwiki; }
  28.  
  29. location ~ \.php$ {
  30. try_files $uri =404;
  31. fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
  32. fastcgi_index index.php;
  33. include fastcgi.conf;
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement