X-Git-Url: https://plomlompom.com/repos/feed.xml?a=blobdiff_plain;f=all_new_2018%2Flinkable_etc_files%2Fweb%2Fetc%2Fnginx%2Fnginx.conf;h=f1be9e63b3510ed218e95ab94294dbfb507aad28;hb=b20927bac93b8e612be6c66e86c440e4d682bcda;hp=ec3e5f99443d0c83fd653ca6e1a68a4771299f2c;hpb=4bd4edbb46ec15969f7de6acc5b24dd60275d0bb;p=config diff --git a/all_new_2018/linkable_etc_files/web/etc/nginx/nginx.conf b/all_new_2018/linkable_etc_files/web/etc/nginx/nginx.conf index ec3e5f9..f1be9e6 100644 --- a/all_new_2018/linkable_etc_files/web/etc/nginx/nginx.conf +++ b/all_new_2018/linkable_etc_files/web/etc/nginx/nginx.conf @@ -3,6 +3,9 @@ user www-data; worker_processes auto; pid /run/nginx.pid; +# we need this for the xslt_stylesheet directive below +#load_module modules/ngx_http_xslt_filter_module.so; + # is expected even if empty events { } @@ -11,9 +14,9 @@ http { # define content-type headers types { text/html html htm shtml; - text/css css; + text/css css; text/xml xml; - text/plain txt sh rst md; + text/plain txt sh rst md asc; application/xhtml+xml xhtml; application/pdf pdf; image/jpeg jpg jpeg; @@ -46,7 +49,7 @@ http { include fastcgi_params; fastcgi_param SCRIPT_FILENAME /usr/lib/git-core/git-http-backend; fastcgi_param GIT_HTTP_EXPORT_ALL ""; - fastcgi_param GIT_PROJECT_ROOT /var/www/public_repos; + fastcgi_param GIT_PROJECT_ROOT /var/public_repos; fastcgi_param PATH_INFO $1; fastcgi_pass unix:/var/run/fcgiwrap.socket; } @@ -59,9 +62,23 @@ http { # gitweb; this needs packages fcgiwrap and gitweb location /repos/ { include fastcgi_params; - fastcgi_param SCRIPT_FILENAME /usr/share/gitweb/gitweb.cgi; - fastcgi_param GITWEB_CONFIG /etc/gitweb.conf; + fastcgi_param SCRIPT_FILENAME /usr/share/gitweb/gitweb.cgi; + fastcgi_param GITWEB_CONFIG /etc/gitweb.conf; fastcgi_pass unix:/var/run/fcgiwrap.socket; } + + # login-protected IRC logs + location ~ /irclogs/([^/]+)/ { + auth_basic "$1 logs"; + auth_basic_user_file /var/www/irclogs_pw/$1; + autoindex on; + } + + ## entry for IRC logs + #location /irclogs/ { + # autoindex on; + # autoindex_format xml; + # xslt_stylesheet /var/www/autoindex.xslt; + #} } }