X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;ds=inline;f=systemfiles%2Fnginx.conf;h=3def78da74abf407fcd91de8a0b62c137931ecef;hb=77e391b5ded27dfcc9bfc7181c1d581adbaa0df6;hp=98626de2ed962d5da8fe8080ede3193a3c25388b;hpb=84a077763b6d9663a5d82835a484e1b55a199ee5;p=config
diff --git a/systemfiles/nginx.conf b/systemfiles/nginx.conf
index 98626de..3def78d 100644
--- a/systemfiles/nginx.conf
+++ b/systemfiles/nginx.conf
@@ -12,9 +12,11 @@ http {
text/html html htm shtml;
text/css css;
text/xml xml;
- text/plain txt;
- text/plain sh;
+ text/plain txt sh rst md;
application/xhtml+xml xhtml;
+ application/pdf pdf;
+ image/jpeg jpg jpeg;
+ image/png png;
}
default_type application/octet_stream;
charset utf-8;
@@ -23,19 +25,64 @@ http {
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
- # IRC logs server
+ # enforce https
server {
- location / {
- auth_basic "IRC logs";
+ listen 80;
+ return 301 https://$host$request_uri;
+ }
+
+ # IRC logs
+ server {
+ listen 443 ssl;
+ server_name dump.plomlompom.com;
+ ssl_certificate /etc/letsencrypt/live/dump.plomlompom.com/fullchain.pem;
+ ssl_certificate_key /etc/letsencrypt/live/dump.plomlompom.com/privkey.pem;
+ root /var/www/html/;
+ location /zettel/ {
+ # rewrite non-suffixed filenames to .html ones
+ rewrite ^(/zettel/(.*/)*[^./]+)$ $1.html;
+ autoindex on;
+ }
+ location /dump/ {
+ autoindex on;
+ }
+ location /geheim/ {
+ auth_basic "geheim geheim";
+ auth_basic_user_file /var/www/password_geheim;
+ autoindex on;
+ }
+ location /irclogs/zrolaps/ {
+ auth_basic "#zrolaps logs";
auth_basic_user_file /var/www/password_irclogs_zrolaps;
autoindex on;
- root /var/www/irclogs_zrolaps/;
+ }
+ location /irclogs/nodrama.de/ {
+ auth_basic "#nodrama.de logs";
+ auth_basic_user_file /var/www/password_irclogs_nodrama_de;
+ autoindex on;
+ }
+ location /irclogs/freakazoid/ {
+ auth_basic "#freakazoid logs";
+ auth_basic_user_file /var/www/password_irclogs_freakazoid;
+ autoindex on;
+ }
+ location /lesekreis/ {
+ auth_basic "Quellen Lesekreis";
+ auth_basic_user_file /var/www/password_lesekreis;
+ autoindex on;
+ }
+ location /uwsgi/ {
+ include uwsgi_params;
+ uwsgi_pass 127.0.0.1:3031;
}
}
# htwtxt
server {
+ listen 443 ssl;
server_name htwtxt.plomlompom.com;
+ ssl_certificate /etc/letsencrypt/live/htwtxt.plomlompom.com/fullchain.pem;
+ ssl_certificate_key /etc/letsencrypt/live/htwtxt.plomlompom.com/privkey.pem;
location / {
proxy_pass http://127.0.0.1:8000;
}