Getting Welcome to Nginx using subdomain

Infos:

  • Used Zammad version: Zammad V6.0
  • Used Zammad installation type: package
  • Operating system: Ubuntu 20.04 LXC container
  • Browser + version: Brave and or Edge

I am wanting to try and get Zammad up and running and so far it does but only on LAN and on http connection. I want to use my Nginx Proxy Manager on a different VM (same physical host) but the issue i am facing right now is that when i enter my subdomain which i have also entered in the zammad.conf in /etc/nginx/sites-enabled i get the “Welcome to Nginx”. When i have the subdomain in the zammad.conf i also get the same page on the lan but if i enter the servers actual ip i get the zammad interface on the lan side and still the “Welcome to Nginx” on the WAN.

I have included my zammad.conf in the post.

#
# this is the nginx config for zammad
#

upstream zammad-railsserver {
    server 127.0.0.1:3000;
}

upstream zammad-websocket {
    server 127.0.0.1:6042;
}

server {
    listen 80;
    listen [::]:80;

    # replace 'localhost' with your fqdn if you want to use zammad from remote
    server_name 192.168.1.249;

    # security - prevent information disclosure about server version
    server_tokens off;

    root /opt/zammad/public;

    access_log /var/log/nginx/zammad.access.log;
    error_log  /var/log/nginx/zammad.error.log;

    client_max_body_size 50M;

    location ~ ^/(assets/|robots.txt|humans.txt|favicon.ico|apple-touch-icon.png) {
        expires max;
    }

    # legacy web socket server
    location /ws {
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
        proxy_set_header CLIENT_IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_read_timeout 86400;
        proxy_pass http://zammad-websocket;
    }

    # action cable
    location /cable {
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
        proxy_set_header CLIENT_IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_read_timeout 86400;
        proxy_pass http://zammad-railsserver;
    }

    location / {
        proxy_set_header Host $http_host;
        proxy_set_header CLIENT_IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;

        # Change this line in an SSO setup
        proxy_set_header X-Forwarded-User "";

        proxy_read_timeout 300;
        proxy_pass http://zammad-railsserver;

        gzip on;
        gzip_types text/plain text/xml text/css image/svg+xml application/javascript application/x-javascript application/json application/xml;
        gzip_proxied any;
    }
}```

Turns out it was due to it being hosted in an LXC container so for anyone wanting to do that aswell, just don´t because it will not work.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.