dokuwiki: use common nginx role
Also get version from NetBox.
This commit is contained in:
parent
3b246447cf
commit
cd8f20852e
5 changed files with 4 additions and 63 deletions
36
roles/dokuwiki/templates/dokuwiki.conf.j2
Normal file
36
roles/dokuwiki/templates/dokuwiki.conf.j2
Normal file
|
@ -0,0 +1,36 @@
|
|||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
server_name doku.fri.uni-lj.si;
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/doku.fri.uni-lj.si/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/doku.fri.uni-lj.si/privkey.pem;
|
||||
|
||||
client_max_body_size 100M;
|
||||
|
||||
root /srv/http/doku.fri.uni-lj.si;
|
||||
index index.php;
|
||||
|
||||
location ~ /(conf/|bin/|inc/|vendor/|install.php) { deny all; }
|
||||
location ~ ^/data/ { internal; }
|
||||
location ~ ^/lib.*\.(js|css|gif|png|ico|jpg|jpeg)$ { expires 365d; }
|
||||
|
||||
location / { try_files $uri $uri/ @dokuwiki; }
|
||||
|
||||
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&$args last;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
try_files $uri $uri/ /doku.php;
|
||||
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param REDIRECT_STATUS 200;
|
||||
fastcgi_param HTTPS on;
|
||||
fastcgi_pass unix:/run/php-fpm.socket;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue