Control Web Panel
WebPanel => Apache => Topic started by: MeNICenT on December 04, 2022, 08:10:04 PM
-
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
-
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