diff options
author | Amin Bandali <bandali@gnu.org> | 2020-05-14 00:17:10 -0400 |
---|---|---|
committer | Amin Bandali <bandali@gnu.org> | 2020-05-14 00:17:10 -0400 |
commit | 3283ced709ae6498e73c6bc6023e5e049d002d10 (patch) | |
tree | 0af96efe5e3b7c9cc5a45288850dde050e1da1b6 /colophon/oddmuse | |
parent | 529184c592d916a5d81d29d2ce4470f12336f35e (diff) | |
download | emacsconf-wiki-3283ced709ae6498e73c6bc6023e5e049d002d10.tar.xz emacsconf-wiki-3283ced709ae6498e73c6bc6023e5e049d002d10.zip |
add nginx config for old oddmuse setup
Diffstat (limited to 'colophon/oddmuse')
-rw-r--r-- | colophon/oddmuse/emacsconf.org.conf | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/colophon/oddmuse/emacsconf.org.conf b/colophon/oddmuse/emacsconf.org.conf new file mode 100644 index 00000000..a1ada04d --- /dev/null +++ b/colophon/oddmuse/emacsconf.org.conf @@ -0,0 +1,48 @@ +server { + listen 80; + #listen [::]:80; + + server_name emacsconf.org www.emacsconf.org; + return 302 https://$server_name$request_uri; +} + +server { + listen 443 ssl http2; + #listen [::]:443 ssl; + server_name www.emacsconf.org; + include /etc/nginx/tls/emacsconf.org.conf; + return 302 https://emacsconf.org$request_uri; +} + +upstream omec { + server 127.0.0.1:11937; +} + +server { + listen 443 ssl http2; + #listen [::]:443 ssl; + server_name emacsconf.org; + + include /etc/nginx/tls/emacsconf.org.conf; + + location / { + if ($is_args = "") { rewrite ^(.*)/main$ /$1 redirect; } + # if ($request_uri ~ "^/([\d]{4})/$") { return 302 /$1; } + + proxy_pass http://omec; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + + location /config { alias /opt/oddmuse-emacsconf/data/config; default_type text/plain; } + location /s/ { root /opt/oddmuse-emacsconf/data; } + location /videos { + alias /var/www/video.emacsconf.org; + autoindex on; + autoindex_exact_size off; + } + } +} |