Move apache2 port 80/443 elsewhere to put traefik infront of hestiacp

Long title that pretty much describes what I want to do.

I love HestiaCP because it’s out of the box easy and while my initial VPS1 host sometimes dies or I need to rebuild, etc the best part is having a second VPS with hestiaCP installed and I just restore the user backup and I’m up and running in no time.

Don’t shoot me but I want to keep hestia on it, but I like to put some docker apps on it and put them behind ssl using Caddy or traefik. Ideally then also let traefik run on *:80 and *:443 and direct those ports to hestiaCP.
and here comes my question to the experts. I messed with the /etc/apache2/ports.conf and /etc/apache2/sites-available/000-default.conf to change the default listening ports

I changed the ports in /etc/apache2/conf.d/XXXIP.conf and borked apache2.

Apache2 is not starting. reverting XXXIP.conf makes apache runnign but ;blocks again port 80 and 443.

“(98)Address already in use: AH00072: make_sock: could not bind to address xxx.xxx.xx.xxx:6443”

I’m clearly missing something important to free up the ports in the first place and run hestiaCP/apache2 on 6443 and 8080 to then get traefik running in front of it.

Anyone with some idea for me please ? Much appreciated….

If you are using Apache2 in Hestia, then you are using Nginx+Apache2. Nginx is the service listening on ports 80 and 443, while Apache2 listens on ports 8080 and 8443.

Thanks a lot .. but now I’m fully confused .. .. cause when checking with netstat

cp 0 0 xx.xxx.xx.xx:880 0.0.0.0:* LISTEN 616/nginx: master p
tcp 0 0 xx.xxx.xx.xx:443 0.0.0.0:* LISTEN 24665/apache2
tcp 0 0 xx.xxx.xx.xx:80 0.0.0.0:* LISTEN 24665/apache2
tcp 0 0 xx.xxx.xx.xx:8443 0.0.0.0:* LISTEN 616/nginx: master p
tcp 0 0 0.0.0.0:8083 0.0.0.0:* LISTEN 603/nginx: master p
tcp 0 0 127.0.0.1:8081 0.0.0.0:* LISTEN 24665/apache2
tcp 0 0 127.0.0.1:8084 0.0.0.0:* LISTEN 616/nginx: master p

nginx runs on 8443 and apache lurks on 80 and 443 .. hence I started to mess with them ..
I had in my mind that the feature was that NGinx precaches and hands over to apache .. but when starting to look I found apache2 running on 80/443

Maybe an OS upgrade messed up the Nginx/Apache conf, but Hestia uses Nginx (80, 443) and Apache2 (8080, 8443), so something must have happened on your server :wink:

1 Like