Thumbnail

mod/infra.git

Clone URL: https://git.buni.party/mod/infra.git

Viewing file on branch master

1server {
2 server_name u.buni.party;
3 index index.html;
4
5 location = / {
6 return 301 /mod/;
7 }
8
9 # alias requests to correct uder directory
10 # don't reroute requests to /user/cgi-bin, however
11 location ~ ^/([^/]+)(?:/(?!cgi-bin/|noserv/)(.*))?$ {
12 alias /home/$1/web/$2;
13 }
14
15 location ~ ^/([^/]+)/cgi-bin/(.*)$ {
16 gzip off;
17 fastcgi_pass unix:/var/run/fcgiwrap.socket;
18 include /etc/nginx/fastcgi_params;
19 fastcgi_param SCRIPT_FILENAME /home/$1/web/cgi-bin/$2;
20 }
21
22 # don't serve anything from noserv/
23 location ~ ^/[^/]+/noserv(?:/.*)?$ {
24 return 403;
25 }
26
27 listen 80;
28 listen [::]:80;
29}
30