home · contact · privacy
4bb06e5fd7902ea731b6b136af38d2c19dd27708
[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;
16             text/plain                            sh;
17             application/xhtml+xml                 xhtml;
18             application/pdf                       pdf;
19             image/jpeg                            jpg jpeg;
20             image/png                             png;
21         }
22         default_type application/octet_stream;
23         charset utf-8;
24
25         # logging
26         access_log /var/log/nginx/access.log;
27         error_log /var/log/nginx/error.log;
28
29         # enforce https
30         server {
31                 listen 80;
32                 return 301 https://$host$request_uri;
33         }
34
35         # IRC logs
36         server {
37                 listen 443 ssl;
38                 server_name dump.plomlompom.com;
39                 ssl_certificate /etc/letsencrypt/live/dump.plomlompom.com/fullchain.pem;
40                 ssl_certificate_key /etc/letsencrypt/live/dump.plomlompom.com/privkey.pem;
41                 root /var/www/html/;
42                 location /lifelog/ {
43                         autoindex on;
44                 }
45                 location /dump/ {
46                         autoindex on;
47                 }
48                 location /geheim/ {
49                         auth_basic "geheim geheim";
50                         auth_basic_user_file /var/www/password_geheim;
51                         autoindex on;
52                 }
53                 location /irclogs/zrolaps/ {
54                         auth_basic "#zrolaps logs";
55                         auth_basic_user_file /var/www/password_irclogs_zrolaps;
56                         autoindex on;
57                 }
58                 location /irclogs/nodrama.de/ {
59                         auth_basic "#nodrama.de logs";
60                         auth_basic_user_file /var/www/password_irclogs_nodrama_de;
61                         autoindex on;
62                 }
63                 location /irclogs/freakazoid/ {
64                         auth_basic "#freakazoid logs";
65                         auth_basic_user_file /var/www/password_irclogs_freakazoid;
66                         autoindex on;
67                 }
68                 location /lesekreis/ {
69                         auth_basic "Quellen Lesekreis";
70                         auth_basic_user_file /var/www/password_lesekreis;
71                         autoindex on;
72                 }
73         }
74
75         # htwtxt
76         server {
77                 listen 443 ssl;
78                 server_name htwtxt.plomlompom.com;
79                 ssl_certificate /etc/letsencrypt/live/htwtxt.plomlompom.com/fullchain.pem;
80                 ssl_certificate_key /etc/letsencrypt/live/htwtxt.plomlompom.com/privkey.pem;
81                 location / {
82                         proxy_pass http://127.0.0.1:8000;
83                 }
84         }
85 }