FQDN not working only local IP address

After i changed the FQDN in /etc/nginx/sites-available/zammad.conf

upstream zammad-railsserver {
    server localhost:3000;
}

upstream zammad-websocket {
    server localhost:6042;
}

server {
    listen 80;

    # replace 'localhost' with your fqdn if you want to use zammad from remote
    server_name support.mydomain.com;

    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) {
        expires max;
    }

i recieve this error message

2018/04/20 14:07:16 [error] 1316#1316: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.168.114, server: support.mydomain.com, request: “GET / HTTP/1.1”, upstream: “http://192.168.168.5:3000/”, host: “support.mydomain.com

if i change the server name to server_name 192.168.168.5 it works

same like tniebergall

Hey,

can you please test your setup with the full configuration file from repo?
Also, does your nginx throw any erors / warnings during startup?

this is the nginx config for zammad

upstream zammad-railsserver {
server localhost:3000;
}

upstream zammad-websocket {
server localhost:6042;
}

server {
listen 80;

replace ‘localhost’ with your fqdn if you want to use zammad from remote

server_name localhost;

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) {
expires max;
}

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

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

}
}

Which Version of Zammad did you install?
I expected the same when I installed 2.4 from scratch on debian.

Afterwards I tried 2.3 It worked.
I thought I did something wrong or in a different manner when I installed 2.4 and thought It was my fault.

If you used 2.4 try 2.3 too and post the results.

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