6 # we need this for the xslt_stylesheet directive below
7 #load_module modules/ngx_http_xslt_filter_module.so;
9 # is expected even if empty
14 # define content-type headers
16 text/html html htm shtml;
19 text/plain txt sh rst md asc;
20 application/xhtml+xml xhtml;
25 default_type application/octet_stream;
28 # logging deactivated due to GDPR
29 #access_log /var/log/nginx/access.log;
30 #error_log /var/log/nginx/error.log;
32 # HTTP server: only enforce HTTPS
35 return 301 https://$host$request_uri;
41 server_name REPLACE_fqdn_ECALPER;
42 ssl_certificate /etc/letsencrypt/live/REPLACE_fqdn_ECALPER/fullchain.pem;
43 ssl_certificate_key /etc/letsencrypt/live/REPLACE_fqdn_ECALPER/privkey.pem;
45 index index.html index.htm index.nginx-debian.html;
47 # serve /var/www/public_repos/* for HTTPS git cloning
48 location ~ /repos/clone(/.*) {
49 include fastcgi_params;
50 fastcgi_param SCRIPT_FILENAME /usr/lib/git-core/git-http-backend;
51 fastcgi_param GIT_HTTP_EXPORT_ALL "";
52 fastcgi_param GIT_PROJECT_ROOT /var/public_repos;
53 fastcgi_param PATH_INFO $1;
54 fastcgi_pass unix:/var/run/fcgiwrap.socket;
58 location /repos/static/ {
59 alias /usr/share/gitweb/static/;
62 # gitweb; this needs packages fcgiwrap and gitweb
64 include fastcgi_params;
65 fastcgi_param SCRIPT_FILENAME /usr/share/gitweb/gitweb.cgi;
66 fastcgi_param GITWEB_CONFIG /etc/gitweb.conf;
67 fastcgi_pass unix:/var/run/fcgiwrap.socket;
70 # login-protected IRC logs
71 location ~ /irclogs/([^/]+)/ {
73 auth_basic_user_file /var/www/irclogs_pw/$1;
80 # autoindex_format xml;
81 # xslt_stylesheet /var/www/autoindex.xslt;