123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- server {
- listen 80 default_server;
- listen [::]:80 default_server;
- server_name localhost;
-
- return 301 https://$host$request_uri;
- }
- server {
-
-
- listen 443 ssl;
- listen [::]:443;
- ssl_certificate /etc/letsencrypt/live/wiki.castanedo.es/fullchain.pem;
- ssl_certificate_key /etc/letsencrypt/live/wiki.castanedo.es/privkey.pem;
-
-
-
-
-
-
-
-
-
-
-
- root /var/www/wiki;
-
- index index.php index.html index.htm;
- server_name localhost;
- access_log /var/log/nginx/wiki-access.log;
- error_log /var/log/nginx/wiki-error.log;
-
-
- include snippets/hsts.conf;
-
-
- include snippets/allowed.conf;
- include snippets/denied.conf;
- location / {
-
-
- try_files $uri $uri/ =404;
- error_page 404 = @mediawiki;
- }
-
- location @mediawiki {
- rewrite ^/wiki([^?]*)(?:\?(.*))? /index.php?title=$1&$2 last;
- }
-
-
- location ~ \.php$ {
- include snippets/fastcgi-php.conf;
-
- fastcgi_pass unix:/run/php/php7.2-fpm.sock;
- }
-
-
- location ^~ /images/ {
-
- }
-
- location ^~ /images/deleted/ {
- deny all;
- }
-
- location ^~ /cache/ { deny all; }
- location ^~ /languages/ { deny all; }
- location ^~ /maintenance/ { deny all; }
- location ^~ /serialized/ { deny all; }
- location ^~ /mw-config/ { deny all; }
-
- location ~ /.(svn|git)(/|$) { deny all; }
- }
|