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 | |
parent | 529184c592d916a5d81d29d2ce4470f12336f35e (diff) | |
download | emacsconf-wiki-3283ced709ae6498e73c6bc6023e5e049d002d10.tar.xz emacsconf-wiki-3283ced709ae6498e73c6bc6023e5e049d002d10.zip |
add nginx config for old oddmuse setup
Diffstat (limited to '')
-rw-r--r-- | colophon/oddmuse.md | 1 | ||||
-rw-r--r-- | colophon/oddmuse/emacsconf.org.conf | 48 |
2 files changed, 49 insertions, 0 deletions
diff --git a/colophon/oddmuse.md b/colophon/oddmuse.md index 13e9f926..482d2f30 100644 --- a/colophon/oddmuse.md +++ b/colophon/oddmuse.md @@ -12,3 +12,4 @@ various configuration files we used to use: - [[oddmuse/server.conf]] - [[oddmuse/server.pl]] - [[oddmuse/omecp.pl]] +- [[oddmuse/emacsconf.org.conf]] (nginx) 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; + } + } +} |