Unable to access on Port 80

  • Used Zammad version: 3.1.0
  • Used Zammad installation source: Source
  • Operating system: Ubuntu 18.0.4 with NGINX and Postgre
  • Browser + version: Safari 13.x, Firefox 69.x

### Expected behavior:

  • Should show the Zammad on entering the FQDN normally.

### Actual behavior:

  • On entering the FQDN in the browser: Cannot Connect to the server.

  • On entering the server IP: NGINX default page (Welcome to NGINX)

  • It works if I edit the /etc/nginx/sites-enabled/zammad.conf, and change the listening port to any other port e.g. 1010, 8080 etc. and access Zammad through IP:New Port(8080, 1010), or FQDN:(8080,1010)

Is this the way it is supposed to work, or have I missed something. Here is the zammad.conf in its entirety:

upstream zammad-railsserver {
server 127.0.0.1:3000;
}

upstream zammad-websocket {
server 127.0.0.1:6042;
}

server {
listen 80;

# replace 'localhost' with your fqdn if you want to use zammad from remote
server_name support.fqdn.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;
#    }

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

Hey @TyrannosaurHex,

Is that really your FQDN?

What do you mean with “it works”? What kind of page are you seeing? The welcome to NGINX page? That would make sense, anything else won’t.

With the information you supplied:
If the above really is your config and that’s really your fqdn it should work.
If the above really is your config and that’s not your fqdn change it and it should work.

If none of the above applies please provide further information.

cheers

No, that’s not the actual FQDN. There is a domain name instead of “fqdn” there.

I’m sorry, I should have specified this. When it works, it shows the zammad first visit set-up page. This happens when I modify the listening port from anything other than 80 in the zammad.conf, and enter the that port number in the address bar after the IP/URL.

If I specify 80 as the listening port, it shows the NGINX default page whether I enter :80 in the address bar or not.

Could you configure your nginx back to Port 80 and restart your nginx to test that again?

Well, I just did the “dance” all over again, from scratch by wiping the server.

Installed from source again, and this time it is working - though I do not know why. Specially since I did nothing special this time around, and it was a new VM instance last time too. As a result I am in no better position to handle this problem if it comes up again.

Thank you all for your time.

Hello,

I have the same problem. Installed CentOS 7. Installed “Server with GUI”, then Xfce. Installed elasticsearch and then Zammad. When i go to Localhost i get greeted by CentOS default page.

Please provide your webservers configuration.
I assume you’re using nginx, so please provide the vhost configuration of your Zammad-vHost.

I guess you did not edit it as described on:
https://docs.zammad.org/en/latest/install-centos.html#nginx

Also, it’s rather a bad idea to hijack old threads, because the overview suffers greatly. For the next time, please create your own thread.

Sorry it was not my intention to cause grieviances.

Im not sure i have a Zammad-vHost configuration. I followed the guide at https://docs.zammad.org/en/latest/install-centos.html

If i would have a vhost config where would it be located?

Here is my nginx.conf
https://pastebin.com/vQKks0GW

And Zammad
https://pastebin.com/k2sQvLVG

I have a not so good memory but IIRC it worked for me only when I did it on an Ubuntu server. I clearly remember moving from CentOS(my first choice) to Ubuntu because I was more familiar with it. Even then it took me multiple retries to get it working.

Anyhow from the first look, in your nginx.conf the webserver is listening on Port 81, while zammad.conf states Port 80. This is a sort of a conflict when webserver is asking you to look in port 81, while Zammad is available at port 80.

That should solve it. Feel free to reach out in case of any further help.

Yes im sorry i should have said something but i changed nginx to port 81 and now it works with Zammad. But i have concerns since it should work with both nginx and Zammad on port 80 according to the manual i was following.

You don’t need server blocks in both nginx.conf and zammad.conf Comment out the server block in your nginx.conf

   server {
    listen       81 default_server;
    listen       [::]:81 default_server;
    server_name  _;
    root         /usr/share/nginx/html;
}

In the nginx.conf you just need to specify the location of /sites-enabled/*.conf files so they are loaded when the webserver starts.

If port 80 is already blocked, this is not Zammad related, but another Process using this port.
You’ll need to find out which service that is.

That is out of scope for the Zammad documentation, sorry.

Aha, so the default nginx.conf blocks Zammad?

Perhaps this can be adressed in the documentation of https://docs.zammad.org/en/latest/install-centos.html ? Since it seems to be the default nginx.conf for CentOS 7 and also seems to be a reaccuring problem [solved] Zammad basic Installation issues: nginx and elasticsearch

Just a suggestion.

Pull requests are always welcome :wink:

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