Koozali.org: home of the SME Server
Obsolete Releases => SME Server 7.x => Topic started by: peterhocking on March 13, 2008, 12:42:13 PM
-
Hi
Is it possible to change the https port from 443 to something else so the the current functionality is retained, ie. when I enter www.mydomain/webmail, I still get redirected to https://www.mydomain/webmail?
TIA
Peter :-)
-
why do you want to change the port
as the the server-manager uses https as well it may break stuff
-
The webmail redirect is handled in /etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/30WebmailAliases
If you want to change the redirect from "https://www.mydomain/webmail" to "https://www.mydomain:4443/webmail" you would need to customize this template fragment.
I would recommend implementing the "new" port using a port forwarding rule.
So, if your objective is to get your webmail redirect to use a port other than 443 from the public internet, your solution looks like this:
1) Setup a port forwarding rule that forwards port 4443 to port 443 on "localhost"
2) Verify that you can now access webmail at https://www.mydomain:4443/webmail
3) Modify the webmail "rewrite" rule by executing the following commands:mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/VirtualHosts
cd /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/VirtualHosts
sed s/"%{HTTP_HOST}"/"%{HTTP_HOST}:4443"/ \
/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/30WebmailAliases > \
30WebmailAliases
signal-event email-update
This re-direct will work correctly from OUTSIDE your network (or if you access your server from INSIDE using the WAN IP address), but will NOT work if you access your server by name or LAN IP from the LAN.