Add wiki
This commit is contained in:
parent
bf45e90aee
commit
58db76e8e3
2 changed files with 56 additions and 0 deletions
55
nginx/sites-available/wiki.zzls.xyz.conf
Normal file
55
nginx/sites-available/wiki.zzls.xyz.conf
Normal file
|
@ -0,0 +1,55 @@
|
|||
server {
|
||||
access_log /var/log/nginx/wiki.zzls.xyz.access.log combined;
|
||||
error_log /var/log/nginx/wiki.zzls.xyz.error.log;
|
||||
server_name wiki.zzls.xyz;
|
||||
|
||||
# Security headers and general settings
|
||||
include configs/securityheaders.conf;
|
||||
include configs/general.conf;
|
||||
|
||||
root /usr/share/webapps/dokuwiki;
|
||||
index doku.php;
|
||||
|
||||
#Remember to comment the below out when you are installing DokuWiki, and uncomment it when you are 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;
|
||||
}
|
||||
|
||||
# QUIC
|
||||
add_header Alt-Svc 'h3=":443"; ma=86400';
|
||||
|
||||
listen 443 http3;
|
||||
listen 443 http2 ssl; # managed by Certbot
|
||||
ssl_certificate /etc/letsencrypt/live/wiki.zzls.xyz/fullchain.pem; # managed by Certbot
|
||||
ssl_certificate_key /etc/letsencrypt/live/wiki.zzls.xyz/privkey.pem; # managed by Certbot
|
||||
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
|
||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
|
||||
|
||||
}
|
||||
server {
|
||||
if ($host = wiki.zzls.xyz) {
|
||||
return 301 https://$host$request_uri;
|
||||
} # managed by Certbot
|
||||
|
||||
listen 80;
|
||||
|
||||
server_name wiki.zzls.xyz;
|
||||
return 404; # managed by Certbot
|
||||
|
||||
|
||||
}
|
1
nginx/sites-enabled/wiki.zzls.xyz.conf
Symbolic link
1
nginx/sites-enabled/wiki.zzls.xyz.conf
Symbolic link
|
@ -0,0 +1 @@
|
|||
../sites-available/wiki.zzls.xyz.conf
|
Loading…
Reference in a new issue