Force webmail to another port

realcryptonight

Verified User
Joined
Nov 16, 2019
Messages
184
This can be done with a custom virtualhost setup but this requires knowing how to setup a custom virtualhost and knowing how to configure it.
But why do you want it on the different port? webmail/roundcube is a website page so…
 

sysdev

Verified User
Joined
Jul 16, 2007
Messages
363
This can be done with a custom virtualhost setup but this requires knowing how to setup a custom virtualhost and knowing how to configure it.
But why do you want it on the different port? webmail/roundcube is a website page so…
Plus... every user will have to add the new port to the url.
 

mxroute

Verified User
Joined
Sep 24, 2019
Messages
119
While I'm sure that DA has built-in support for a much easier way to do this, I did something similar not long ago. But it wasn't to move it from 443, it was to let it also work on port 2096 because I had migrated uses from cPanel and wanted their bookmarks to still work. So I installed Caddy and put this in my Caddyfile:

{
http_port 2095
https_port 2096
}

ocean.mxroute.com:2096 {
redir https://sunfire.mxrouting.net/webmail
tls /etc/caddy/mxroute.com.cert.combined /etc/caddy/mxroute.com.key
}

I'm not suggesting for a moment that it's the "right" solution for you, but when I needed to think outside of the box this was what I did to a similar end.
 

Migdiradmin

Verified User
Joined
Jan 5, 2020
Messages
105
This can be done with a custom virtualhost setup but this requires knowing how to setup a custom virtualhost and knowing how to configure it.
But why do you want it on the different port? webmail/roundcube is a website page so…
Security reasons only admin check this server emails, and in csf almost every port are blocked only IP admin can access to other ports.

Can explain better where to add in virtualhost?
 

Migdiradmin

Verified User
Joined
Jan 5, 2020
Messages
105
While I'm sure that DA has built-in support for a much easier way to do this, I did something similar not long ago. But it wasn't to move it from 443, it was to let it also work on port 2096 because I had migrated uses from cPanel and wanted their bookmarks to still work. So I installed Caddy and put this in my Caddyfile:



I'm not suggesting for a moment that it's the "right" solution for you, but when I needed to think outside of the box this was what I did to a similar end.
Thanks, where i can add that code?
 
Top