server { listen 444 ssl; server_name lykos.aninix.net; include sec.conf; include default.csp.conf; root /usr/share/webapps/; location ~ ^/$ { return 302 https://lykos.aninix.net:444/lykos-wiki/Main_Page; } location ~ ^/lykos-wiki/ { index /mediawiki/index.php; try_files $uri $uri/ @mediawiki; } location @mediawiki { rewrite ^/lykos-wiki/(.*)$ /mediawiki/index.php?title=$1; } location ~ \.php?$ { fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock; fastcgi_index /mediawiki/index.php; try_files $uri @mediawiki; } location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { try_files $uri /lykos-wiki/index.php; expires max; log_not_found off; } # Restrictions based on the .htaccess files location ~ ^/lykos-wiki/(cache|includes|maintenance|languages|serialized|tests|images/deleted)/ { deny all; } location ~ ^/lykos-wiki/(bin|docs|extensions|includes|maintenance|mw-config|resources|serialized|tests)/ { internal; } location ^~ /images/ { try_files $uri /index.php; } location ~ /\. { access_log off; log_not_found off; deny all; } }