forked from exozyme/nginx
Add Unix socket proxying for exopages
This commit is contained in:
parent
80b95b12ab
commit
72cfa07c13
10
pages.conf
10
pages.conf
|
@ -18,11 +18,11 @@ server {
|
||||||
server {
|
server {
|
||||||
listen 443 ssl http2;
|
listen 443 ssl http2;
|
||||||
listen [::]:443 ssl http2;
|
listen [::]:443 ssl http2;
|
||||||
server_name ~^(?<user>.+)\.exozy\.me;
|
server_name ~^(?<page>.+)\.exozy\.me;
|
||||||
|
|
||||||
include conf.d/ssl;
|
include conf.d/ssl;
|
||||||
|
|
||||||
root /srv/http/pages/$user;
|
root /srv/http/pages/$page;
|
||||||
index index.html;
|
index index.html;
|
||||||
|
|
||||||
error_page 404 /404.html;
|
error_page 404 /404.html;
|
||||||
|
@ -31,6 +31,10 @@ server {
|
||||||
}
|
}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
try_files $uri $uri.html $uri/ =404;
|
try_files $uri $uri.html $uri/ = @fallback;
|
||||||
|
}
|
||||||
|
|
||||||
|
location @fallback {
|
||||||
|
proxy_pass http://unix:/srv/http/pages/$page;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue