server { listen 8080; server_name wiki.server.ank; access_log syslog:server=unix:/dev/log,facility=daemon,tag=vh_tribu,nohostname main; error_log syslog:server=unix:/dev/log,facility=daemon,tag=vh_tribu_err,nohostname debug; root /srv/www/; location /pub { alias /srv/www/wiki/pub; } # ACME challenge location ^~ /.well-known { allow all; alias /srv/www/wiki/pub/cert/.well-known/; default_type "text/plain"; try_files $uri =404; } location @pmwiki { rewrite ^/wiki/(.*) /wiki/pmwiki.php?n=$1; } location /wiki { index pmwiki.php; try_files $uri $uri/ @pmwiki; } location ~ ^\/wiki(.+\.php)$ { index pmwiki.php; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_index pmwiki.php; try_files $uri /pmwiki.php =404; include /etc/nginx/fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_pass 127.0.0.1:9000; } }