[Solved] Apache vhosts won't listen on defined custom port

Reported by: flips
Created: 2 months 4 days ago
Last reply: 2 months 3 days ago
Views: 64

I add my own domain in TinyCP, and set it to listen to a custom port, say *:12345 or localhost:12345.

apache2ctl -S shows that it's added:

*:12345        my.own.tld (/opt/tinycp/domains/my.own.tld/apache.conf:1)

But restarting Apache won't make it listen on that port. It seems to only listen to *:80 and *:443 no matter what I define:

apache2 14474        root    4u  IPv6 1605444883      0t0  TCP *:http (LISTEN)
apache2 14474        root    6u  IPv6 1605444887      0t0  TCP *:https (LISTEN)
apache2 16217    www-data    4u  IPv6 1605444883      0t0  TCP *:http (LISTEN)
apache2 16217    www-data    6u  IPv6 1605444887      0t0  TCP *:https (LISTEN)
apache2 16218    www-data    4u  IPv6 1605444883      0t0  TCP *:http (LISTEN)
apache2 16218    www-data    6u  IPv6 1605444887      0t0  TCP *:https (LISTEN)
apache2 16219    www-data    4u  IPv6 1605444883      0t0  TCP *:http (LISTEN)
apache2 16219    www-data    6u  IPv6 1605444887      0t0  TCP *:https (LISTEN)

(Domain anonymized)

Seems to be Apache specific, nginx runs as expected.

(Tested on Debian 9 and Debian 10)

Fixed. Is handled in this way:

<IfDefine !LISTEN_94_237_89_177_8011>
  Listen 94.237.89.177:8011
  Define LISTEN_94_237_89_177_8011
</IfDefine>
Join our Discord server
Write a reply Edit a reply