New in CWP Edge-LatestFree with every CWPpro licenceWebsites up to 300x faster

CWP now includes LSPHP, LSAPI-Cache and CWP Cage at no extra cost with all CWPpro licences. The LSAPI-Cache plugin is integrated into our WordPress and other script installers, and CWP Cage gives every user complete isolation. Available now in the CWP Edge-Latest version.

Get CWPpro ›

Way to set http and https on other ports as 80 and 443 ?

Started by MeNICenT, December 04, 2022, 08:10:04 PM

Previous topic - Next topic

MeNICenT

In the apache templates there are placeholders like
PORT_REPLACE
and
%web_ssl_port%
but I can't find where these are defined
(The intention is to change the standard apache on non-standard port as the CWP-servers will be behind a Caddy or HA loadbalancer)
Thanks

overseer

A cleaner way might be with iptables; I've done this on a cPanel server before:
nano /etc/sysconfig/iptables
Add:

-A INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT

-A INPUT ! -i lo -p tcp -m conntrack --ctstate NEW -m tcp --dport 8080 -j ACCEPT

COMMIT

-A PREROUTING -p tcp --dport 8080 -j REDIRECT --to-ports 80

COMMIT

Then save & restart:
iptables-save
systemctl restart iptables