Where's My Reverse Proxy?

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;
}

Maybe its the document root?

user@hestia:~$ sudo /usr/local/hestia/bin/v-list-web-domain user my-domain.com
DOMAIN:           my-domain.com
ALIAS:            www.my-domain.com
IP:               123.456.789.012
DOCUMENT_ROOT:    /home/user/web/my-domain.com/public_html/
TEMPLATE:         default
BACKEND:          socket
PROXY:            neos-proxy
PROXY EXT:        css htm html js mjs json xml apng avif bmp cur gif ico jfif jpg jpeg pjp pjpeg png svg tif tiff webp aac caf flac m4a midi mp3 ogg opus wav 3gp av1 avi m4v mkv mov mpg mpeg mp4 mp4v webm otf ttf woff woff2 doc docx odf odp ods odt pdf ppt pptx rtf txt xls xlsx 7z bz2 gz rar tar tgz zip apk appx bin dmg exe img iso jar msi webmanifest
DISK:             1
BW:               0
SUSPENDED:        no
TIME:             23:30:26
DATE:             2025-05-21

You are using %web_port% and %web_ssl_port% in your templates but you are using Nginx+Apache so it translates to ports 8080 and 8443. You must replace %web_port% with %proxy_port% and %web_ssl_port% with %proxy_ssl_port% and rebuild your site.

2 Likes

404 never looked so good!

Thanks a million @sahsanu

That was a ridiculously quick debug!

1 Like