Playbooks to a new Lilik
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1021 B

  1. server {
  2. listen 80;
  3. listen [::]:80;
  4. server_name wiki.domain.example;
  5. return 301 https://$server_name$request_uri;
  6. }
  7. server {
  8. listen [::]:443 ssl;
  9. listen 443 ssl;
  10. client_max_body_size 4M;
  11. client_body_buffer_size 128k;
  12. root /usr/share/dokuwiki;
  13. index doku.php;
  14. location ~ /(data/|conf/|bin/|inc/|install.php) { deny all; }
  15. location / { try_files $uri $uri/ @dokuwiki; }
  16. location @dokuwiki {
  17. rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
  18. rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
  19. rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
  20. rewrite ^/(.*) /doku.php?id=$1&$args last;
  21. }
  22. location ~ \.php$ {
  23. try_files $uri $uri/ /doku.php;
  24. include fastcgi_params;
  25. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  26. fastcgi_param REDIRECT_STATUS 200;
  27. fastcgi_pass unix:/var/run/php5-fpm.sock;
  28. }
  29. }