summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--colophon/oddmuse.md1
-rw-r--r--colophon/oddmuse/emacsconf.org.conf48
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;
+ }
+ }
+}