Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
46 lines (36 sloc) 1 KB
server {
listen 80 default_server;
listen [::]:80 default_server;
root /wiki/html;
index index.html;
server_name VIRTUAL_HOST;
client_max_body_size 10m;
# ikiwiki site
location / {
try_files $uri $uri/ =404;
error_page 404 @ikiwiki404;
}
location /ikiwiki.cgi {
gzip off;
fastcgi_param SCRIPT_FILENAME /wiki/html/ikiwiki.cgi;
fastcgi_param DOCUMENT_ROOT /wiki/html;
fastcgi_param PATH_INFO $uri;
fastcgi_param QUERY_STRING $args;
fastcgi_param HTTP_HOST $server_name;
fastcgi_index ikiwiki.cgi;
fastcgi_pass unix:/run/fcgiwrap.socket;
include /etc/nginx/fastcgi_params;
}
location @ikiwiki404 {
fastcgi_pass unix:/run/fcgiwrap.socket;
fastcgi_index ikiwiki.cgi;
fastcgi_param SCRIPT_FILENAME /wiki/html/ikiwiki.cgi;
fastcgi_param DOCUMENT_ROOT /wiki/html;
# For 404 plugin
fastcgi_param QUERY_STRING "";
fastcgi_param REQUEST_METHOD "get";
fastcgi_param REDIRECT_STATUS 404;
fastcgi_param REDIRECT_URL $uri;
include /etc/nginx/fastcgi_params;
}
}