sero/nginx-templates/default.conf.template

22 lines
457 B
Plaintext
Raw Normal View History

2023-10-25 17:08:11 +02:00
server {
listen 80;
server_name ~^(?<subdomain>\w*)\.${DOMAIN}.${ZONE}${DOLLAR};
location / {
if ($http_x_subdomain = "") {
set $http_x_subdomain $subdomain;
}
proxy_set_header X-Subdomain $http_x_subdomain;
proxy_pass http://${SERVER}:${SERVER_PORT}/;
}
}
server {
listen 80;
server_name ${DOMAIN}.${ZONE};
location / {
proxy_pass http://${SERVER}:${SERVER_PORT}/;
}
}