-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
only getting 404 on the public https endpoint but im able to access on localhost:80 #321
Comments
What does your mox.conf look like? Especially the public listener is relevant. Also the Hostname that's configured, both globally in mox.conf and in the public listener. What I've seen go wrong with a reverse proxy is that they don't pass along the Host header when reverse proxying. So that request ends up at mox with as a request to http://127.0.0.1:8000, but mox needs to know for which hostname the request was to answer it properly. |
i have a bash script that runs as the root user and checks the external ip address, because my public ipv4 address is dynamic, using api.ipify.org and api6.ipify.org and will automatically update the config and restart mox if the ip address changes here is the mox.conf:
this is the relevant parts of my caddyfile and for more info, the caddy server is running directly on proxmox, it is not in a container or vm
here is the relevant part of my /etc/hosts on proxmox
edit:
that shows that apache, im assuming it is an apache webserver at least, is receiving the correct hostname but its not matching |
It is receiving the correct hostname indeed. This isn't apache though, it's the mox builtin webserver. You're getting a 404 because there is no handler active at https://mox.sniper.cat/. The webmail/account/admin handlers are only active on the "internal" listener, which is only accessible on the loopback ips. The quickstart has an example of accessing it using an ssh tunnel. You would have to enable those on the public listener to make them accessible publicly. The reasoning behind this is for security, but it's certainly surprising for some. The new upcoming step-by-step guided setup will be asking if you want to enable those web interfaces on the public listener. However, you'll run into another problem. You've got both an internal/NATed IP that is also reverse proxied in the public listener, and a public IPv6 address. For the reverse proxying to work fully (with IP-based rate limiting and such), you need the |
thank you for the help, now its time for me to go another reverse proxy behind my reverse proxy, also, im assuming that the fact the the IPv6 address is the same on the internal and external of the NATIPs won't cause any problems at least i hope |
Not sure if my problem is the same or if I understood correctly. I have SNAT for my IPv4, but otherwise Mox is directly available from the Internet, so I tried to comment out legacy IP support (and of course did public:
IPs:
# - 192.168.4.10
- 2a02:c0:1001:101::110
NATIPs:
# - 87.238.54.110
- 2a02:c0:1001:101::110
WebmailHTTP:
Enabled: true
WebserverHTTP:
Enabled: true
WebserverHTTPS:
Enabled: true but I still get 404 on /webmail |
Sorry - since I copied the stanza from internal, I did not notice it says |
I found out that my ISP, AT&T, blocks port 25 (for residential customers), idk if it is just blocked on IPv4 or also IPv6, but I imagine it is. Even if port 25 isn’t blocked on IPv6 there are several major email providers, cough cough yahoo and Fastmail cough cough, don’t have IPv6 addresses on their mail servers, so it is not reasonable to have an IPv6-only mail server at the current time |
whenever i go to the public domain i just get a 404 error, i have a caddy reverse proxy that sits in front of mox on the ipv4 address but on the ipv6 address mox is directly exposed to the web and on the ipv4 address i have port forwarded port 25, 465, and 993 to the private ipv4 address of the LXC container mox is running on
also i setup mox to expect to be run standalone and not along side an existing webserver because i have a public static ipv6 address it is on, but i have caddy setup to handle all of my other traffic so i used caddy to reverse proxy traffic from my public dynamic ipv4 address, also my router is setup to automatically allow all traffic going to the ipv6 address of mox container, also i have not setup any of the dns records for mox yet becuase i don't want to risk not receiving any of my emails if possible because my domain is already in use for email
here is the logs from the the last startup
The text was updated successfully, but these errors were encountered: