Couldn't access Zammad UI on localhost but works using Proxy URL

Infos:

  • Used Zammad version: 6.2.0
  • Used Zammad installation type: Source
  • Operating system: Fedora Workstation 39
  • Browser + version: Firefox 121.0

Expected behavior:

  • I have installed Zammad from source and using Apache as a web server, I followed the documentation on setting up Apache configuration. I am using localhost and haven’t set FQDN for now. After setting up a web server, I opened the Firefox browser and entered localhost to start Zammad’s first configuration.

Actual behavior:

  • It shows loading word but nothing came up, when I checked the browser log I found this:
Status
403
Forbidden
VersionHTTP/1.1
Transferred399 B (199 B size)
Referrer Policystrict-origin-when-cross-origin
DNS ResolutionSystem

Steps to reproduce the behavior:

  • Since I installed it from the source, it is difficult to show the steps. But here is my zammad.conf file content
#
# this is the apache config for zammad
#

# security - prevent information disclosure about server version
ServerTokens Prod
ServerName localhost

<VirtualHost *:80>
    # replace 'localhost' with your fqdn if you want to use zammad from remote

    ## don't loose time with IP address lookups
    HostnameLookups Off

    ## needed for named virtual hosts
    UseCanonicalName Off

    ## configures the footer on server-generated documents
    ServerSignature Off

    ProxyRequests Off
    ProxyPreserveHost On

    <Proxy 127.0.0.1:3002>
        Require local
    </Proxy>

    ProxyPass /assets !
    ProxyPass /favicon.ico !
    ProxyPass /apple-touch-icon.png !
    ProxyPass /robots.txt !
    # legacy web socket server
    ProxyPass /ws ws://127.0.0.1:6042/
    # action cable
    ProxyPass /cable ws://127.0.0.1:3002/cable
    ProxyPass / http://127.0.0.1:3002/

    # change this line in an SSO setup
    RequestHeader unset X-Forwarded-User

    DocumentRoot "/opt/zammad/public"

    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>

    <Directory "/opt/zammad/public">
        Options FollowSymLinks
        Require all granted
    </Directory>

</VirtualHost>

Hi @elhananjair.

Did you change the Rails port to 3002? And you are sure that localhost:3002 in the browser is not working?

Did you change the Rails port to 3002?

Yes, I did change that since port 3000 and another process already use 3001.

And you are sure that localhost:3002 in the browser is not working?

Yes, that works fine, I thought that was the proxy address and port that I use Zammad with localhost port 80.

So there is no problem at all?!

I thought the zammad is accessible on port 80, and I set ServerName to localhost. Therefore when I enter localhost on the browser it should load Zammad not with the proxy port, that’s what confusing me. Apache by default is listening on port 80 therefore Zammad should be accessible with localhost on browser

If you have more than one application on the host that runs Zammad and apache, then using mere localhost is not enough. You potentially are viewing a different localhost as you’re expecting.

This is something you have to figure out and we can’t help with.

@MrGeneration I think I haven’t explained my question clearly.
In general, I want to access Zammad in port 80 which is the default port for which Apache listens to. But in my case I am accessing it on the port I set manually on Proxy. If that is how it works fine, I just didn’t understand the Proxy (URL, PORT). In conclusion, Zammad will be accessed in Proxy URL and PORT instead of on default HTTP (80) OR HTTPS(443). Correct me if I am wrong.

@elhananjair I guess you need to (re-)read this.

I haven’t read this one I think that’s why I was confused.

Want to test locally first or use a different Proxy we don’t support? The main application (rails server) is listening on http://127.0.0.1:3000.

If you’re using a proxy server, also ensure that you proxy the websockets as well. The websocket server listens on ws://127.0.0.1:6042.

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