Submitted by Brook on Sun, 07/19/2015 - 07:01
I've fixed this but am reporting it as a bug as I guess you'll want investigate and fix in Virtualmin. This has also happened on two fresh installs.
Changing the listen port, in /etc/httpd/conf/httpd.conf
and through Virtualmin settings:
- Virtualmin - System settings - Server Templates - Default Settings - Apache Website - Port number for virtual hosts: 8080
- And through Virtualmin - server configuration - Change IP Address
Causes httpd to break and fail to start up - reporting that bind cannot start because port has already taken. Googled for ages, and it seems this happens usually when 'Listen' has been set more than once. Sure enough, going through the various files this is what happened - with Virtualmin (or the system) setting the Listen port again in /etc/httpd/conf.d/ssl.conf
underneath the 'Listen 443' line, uncommenting the duplicate `Listen' lines and Apache starts up fine.
Status:
Closed (fixed)
Comments
Submitted by JamieCameron on Sun, 07/19/2015 - 14:36 Comment #1
Can you post the duplicate Listen lines on this ticket? I'm curious to see if they are exactly the same..
Submitted by Brook on Sun, 07/19/2015 - 14:53 Comment #2
Sure:
# When we also provide SSL we have to listen to the
# the HTTPS port in addition.
#
Listen 443
#Listen 176.92.143.173:8080
#Listen [2a01:458:160:21a9::2]:8080
Submitted by JamieCameron on Sun, 07/19/2015 - 15:16 Comment #3
That's odd, none of these Listen lines appear to be for duplicate ports. Are there other Listen lines elsewhere in the Apache config?
Submitted by Brook on Sun, 07/19/2015 - 15:35 Comment #4
No, just the one in
/etc/httpd/conf/httpd.conf
.I checked my CentOS 6 install too, and they don't appear in the ssl.conf, it just has the single
Listen 443
line.Submitted by JamieCameron on Mon, 07/20/2015 - 01:44 Comment #5
I'm not seeing where the duplicate
Listen
directives are then?Submitted by Brook on Mon, 07/20/2015 - 06:07 Comment #6
Do you see duplicates in
/etc/httpd/conf.d/ssl.conf
? (As per my first post?)Submitted by JamieCameron on Mon, 07/20/2015 - 17:54 Comment #7
Ok, I think I see the issue here now - in the next Webmin release, I will add protection against duplicate Listen lines.
Submitted by Issues on Mon, 08/03/2015 - 17:55 Comment #8
Automatically closed -- issue fixed for 2 weeks with no activity.