home · contact · privacy
Add comment.
[config] / buster / etc_files / website / etc / nginx / sites-available / website.nginx
1 server {
2     listen 443 ssl;
3     server_name REPLACE_fqdn_ECALPER;
4     ssl_certificate /etc/letsencrypt/live/REPLACE_fqdn_ECALPER/fullchain.pem;
5     ssl_certificate_key /etc/letsencrypt/live/REPLACE_fqdn_ECALPER/privkey.pem;
6     root /var/www/html/;
7     index index.html index.htm index.nginx-debian.html;
8
9     # serve /var/repos/* for HTTPS git cloning
10     location ~ /repos/clone(/.*) {
11         include fastcgi_params;
12         fastcgi_param SCRIPT_FILENAME /usr/lib/git-core/git-http-backend;
13         # Commented out so only repos are served that contain a
14         # git-daemon-export-ok file.
15         # fastcgi_param GIT_HTTP_EXPORT_ALL "";
16         fastcgi_param GIT_PROJECT_ROOT /var/repos;
17         fastcgi_param PATH_INFO $1;
18         fastcgi_pass unix:/var/run/fcgiwrap.socket;
19     }
20
21     # gitweb static files
22     location /repos/static/ {
23         alias /usr/share/gitweb/static/;
24     }
25
26     # gitweb; this needs packages fcgiwrap and gitweb
27     location /repos/ {
28         include fastcgi_params;
29         fastcgi_param SCRIPT_FILENAME /usr/share/gitweb/gitweb.cgi;
30         fastcgi_param GITWEB_CONFIG /etc/gitweb.conf;
31         fastcgi_pass unix:/var/run/fcgiwrap.socket;
32     }
33 }