forked from exozyme/nginx
36 lines
757 B
Text
36 lines
757 B
Text
server {
|
|
listen 443 ssl http2;
|
|
listen [::]:443 ssl http2;
|
|
server_name ~^(\d)\.exozy\.me;
|
|
|
|
include conf.d/ssl;
|
|
|
|
index index.html;
|
|
|
|
location / {
|
|
# Must use 127.0.0.1 here since it's resolved at runtime
|
|
# https://serverfault.com/questions/638505/nginx-dynamic-proxy-pass-doesnt-resolve-properly
|
|
resolver 192.168.122.1;
|
|
proxy_pass http://localhost:420$1;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl http2;
|
|
listen [::]:443 ssl http2;
|
|
server_name ~^(?<user>.+)\.exozy\.me;
|
|
|
|
include conf.d/ssl;
|
|
|
|
root /srv/http/pages/$user;
|
|
index index.html;
|
|
|
|
error_page 404 /404.html;
|
|
location = /404.html {
|
|
internal;
|
|
}
|
|
|
|
location / {
|
|
try_files $uri $uri.html $uri/ =404;
|
|
}
|
|
}
|