home · contact · privacy
Make new script executable.
[config] / systemfiles / nginx.conf
1 # system integration
2 user www-data;
3 pid /run/nginx.pid;
4
5 # is expected even if empty
6 events {
7 }
8
9 http {
10         # define content-type headers
11         types {
12             text/html                             html htm shtml;
13             text/css                              css;
14             text/xml                              xml;
15             text/plain                            txt sh rst md;
16             application/xhtml+xml                 xhtml;
17             application/pdf                       pdf;
18             image/jpeg                            jpg jpeg;
19             image/png                             png;
20         }
21         default_type application/octet_stream;
22         charset utf-8;
23
24         # logging
25         access_log /var/log/nginx/access.log;
26         error_log /var/log/nginx/error.log;
27
28         # enforce https
29         server {
30                 listen 80;
31                 return 301 https://$host$request_uri;
32         }
33
34         # IRC logs
35         server {
36                 listen 443 ssl;
37                 server_name dump.plomlompom.com;
38                 ssl_certificate /etc/letsencrypt/live/dump.plomlompom.com/fullchain.pem;
39                 ssl_certificate_key /etc/letsencrypt/live/dump.plomlompom.com/privkey.pem;
40                 root /var/www/html/;
41                 location /zettel/ {
42                         # rewrite non-suffixed filenames to .html ones 
43                         rewrite ^(/zettel/(.*/)*[^./]+)$ $1.html;
44                         autoindex on;
45                 }
46                 location /dump/ {
47                         autoindex on;
48                 }
49                 location /geheim/ {
50                         auth_basic "geheim geheim";
51                         auth_basic_user_file /var/www/password_geheim;
52                         autoindex on;
53                 }
54                 location /irclogs/zrolaps/ {
55                         auth_basic "#zrolaps logs";
56                         auth_basic_user_file /var/www/password_irclogs_zrolaps;
57                         autoindex on;
58                 }
59                 location /irclogs/nodrama.de/ {
60                         auth_basic "#nodrama.de logs";
61                         auth_basic_user_file /var/www/password_irclogs_nodrama_de;
62                         autoindex on;
63                 }
64                 location /irclogs/freakazoid/ {
65                         auth_basic "#freakazoid logs";
66                         auth_basic_user_file /var/www/password_irclogs_freakazoid;
67                         autoindex on;
68                 }
69                 location /lesekreis/ {
70                         auth_basic "Quellen Lesekreis";
71                         auth_basic_user_file /var/www/password_lesekreis;
72                         autoindex on;
73                 }
74                 location /uwsgi/ {
75                         include uwsgi_params;
76                         uwsgi_pass 127.0.0.1:3031;
77                 }
78         }
79
80         # htwtxt
81         server {
82                 listen 443 ssl;
83                 server_name htwtxt.plomlompom.com;
84                 ssl_certificate /etc/letsencrypt/live/htwtxt.plomlompom.com/fullchain.pem;
85                 ssl_certificate_key /etc/letsencrypt/live/htwtxt.plomlompom.com/privkey.pem;
86                 location / {
87                         proxy_pass http://127.0.0.1:8000;
88                 }
89         }
90 }