The old server runs httpd 2.4.37-43 and the new one 2.4.51-7. Both have LetsEncrypt working certificates and redirect http requests to https. http://mydomain.se is nicely transferred to https://mydomain.se on BOTH servers:
- Code: Select all
<VirtualHost *:80>
ServerName mydomain.se
Redirect / https://mydomain.se/
ServerAlias www.mydomain.se
RewriteEngine on
RewriteCond %{SERVER_NAME} =www.mydomain.se [OR]
RewriteCond %{SERVER_NAME} =mydomain.se
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
Include /etc/httpd/conf/httpd-le-ssl.conf
The old server has these lines in httpd.conf, to be able to run mailserver through port 80:
- Code: Select all
ProxyPass /webmail/ http://mydomain.se:7080/surgeweb
ProxyPassReverse /webmail/ http://mydomain.se:7080/surgeweb
All webmail requests on the old server on https://mydomain.se/webmail are redirected to https://mydomain.se/surgeweb, which triggers the secure emailserver webversion. Works very well and has done so for many years. The folder webmail exists on both systems in /var/www/html.
surgeweb is the Surgemail command to trigger the webversion of the emailserver which listens on secure port 7443.
On my new server, I have the same ProxyPass/ProxyReverse lines in httpd.conf, but it doesn't send the webmail requests to the emailserver or it cannot handle them:
When I write in the browser on the new server:
- https://mydomain.se/webmail it says: "Service unavailable - The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later. But the server is upp and running.
- http://mydomain.se:7080/surgeweb, the mailserver shows its pages, but warns that the site is not secure, which is correct.
- https://mydomain.se:7443/surgeweb , the mailserver replies as it should and the site is secure.
As the httpd.conf files are identical on both servers, I don't understand why it doesn't work on the new server.
I tried to use different alternative lines:
- Code: Select all
[code]
ProxyPass /webmail/ https://mydomain.se:7443/surgeweb
ProxyPassReverse /webmail/ https://mydomain.se:7443/surgeweb
[/code]
And " /webmail " instead of " /webmail/ "
None of them work on the new server.
I checked that the modules being loaded are identical - mod_proxy is among them.
What do I have to do to get requests for https://mydomain.se/webmail to be redirected to https://mydomain.se/surgeweb ??
Any hints are very welcome!!
Thanks for reading!