2021-02-25 17:50:16 +03:00
|
|
|
server {
|
|
|
|
listen 80;
|
2021-02-26 18:42:30 +03:00
|
|
|
# listen 443 ssl http2;
|
2021-02-25 17:50:16 +03:00
|
|
|
|
2021-02-25 18:02:15 +03:00
|
|
|
server_name wiki.{{domain}};
|
2021-02-26 18:42:30 +03:00
|
|
|
# ssl_certificate /etc/letsencrypt/live/wiki.{{domain}}/fullchain.pem; # managed by Certbot
|
|
|
|
# ssl_certificate_key /etc/letsencrypt/live/wiki.{{domain}}/privkey.pem; # managed by Certbot
|
2021-02-25 17:50:16 +03:00
|
|
|
|
2021-02-26 18:42:30 +03:00
|
|
|
# add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;";
|
|
|
|
# add_header X-Content-Type-Options nosniff;
|
|
|
|
# add_header X-XSS-Protection "1; mode=block";
|
|
|
|
# add_header X-Robots-Tag none;
|
|
|
|
# add_header X-Download-Options noopen;
|
|
|
|
# add_header X-Permitted-Cross-Domain-Policies none;
|
2021-02-25 17:50:16 +03:00
|
|
|
|
|
|
|
root /var/www;
|
|
|
|
|
|
|
|
location / {
|
|
|
|
return 302 /wiki;
|
|
|
|
}
|
|
|
|
|
|
|
|
location ^~ /wiki {
|
|
|
|
index index.php;
|
|
|
|
location ^~ /wiki/maintenance/ {
|
|
|
|
return 403;
|
|
|
|
}
|
|
|
|
location ~ .*.php$ {
|
|
|
|
include /etc/nginx/fastcgi.conf;
|
2021-02-27 14:51:13 +03:00
|
|
|
fastcgi_pass unix:/run/php/php-wiki.sock;
|
2021-02-25 17:50:16 +03:00
|
|
|
fastcgi_index index.php;
|
|
|
|
}
|
|
|
|
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
|
|
|
|
# try_files $uri /index.php;
|
|
|
|
expires max;
|
|
|
|
log_not_found off;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|