I setup some new template files (below) and placed them in the nginx template folder. They show up nicely in the Hestia admin, and everything looks grand… the generated nginx.conf files in the my-domain.com area look right, and I have my nice docker containers doing their happy thing.
But
When I go to the domain name, I just get served the index.html from doc root… lol. Any thoughts?
nonssl template: /usr/local/hestia/data/templates/web/nginx/neos-proxy.tpl
server {
listen %ip%:%web_port%;
server_name %domain_idn% %alias_idn%;
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
location / {
proxy_pass http://127.0.0.1:8087;
proxy_http_version 1.1;
# WebSocket support
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
# Standard proxy headers
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
# WebSocket specific settings
proxy_cache_bypass $http_upgrade;
proxy_no_cache $http_upgrade;
# Timeout settings for WebSocket connections
proxy_read_timeout 3600s;
proxy_connect_timeout 60s;
proxy_send_timeout 60s;
# Buffer settings
proxy_buffering off;
proxy_request_buffering off;
}
location /error/ {
alias %home%/%user%/web/%domain%/document_errors/;
}
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
}
nonsssl nginx.conf: /home/user/conf/web/my-domain.com/nginx.conf
server {
listen 123.456.789.012:8080;
server_name my-domain.com www.my-domain.com;
include /home/user/conf/web/my-domain.com/nginx.forcessl.conf*;
location / {
proxy_pass http://127.0.0.1:8087;
proxy_http_version 1.1;
# WebSocket support
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
# Standard proxy headers
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
# WebSocket specific settings
proxy_cache_bypass $http_upgrade;
proxy_no_cache $http_upgrade;
# Timeout settings for WebSocket connections
proxy_read_timeout 3600s;
proxy_connect_timeout 60s;
proxy_send_timeout 60s;
# Buffer settings
proxy_buffering off;
proxy_request_buffering off;
}
location /error/ {
alias /home/user/web/my-domain.com/document_errors/;
}
include /home/user/conf/web/my-domain.com/nginx.conf_*;
}
EDIT:
I don’t think it matters, but: /etc/nginx/conf.d/maps.conf
# WebSocket upgrade mapping
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
map $http_x_forwarded_for $real_ip {
~^(\d+\.\d+\.\d+\.\d+) $1;
default $remote_addr;
}