I'm suddenly having a problem with webserver configuration in Virtualmin.
A couple of domains had their VirtualHost setting changed from ipaddress:80 to *:80, and I can't figure out why -- they all have their IP Address (under Server Configuration) set to Shared Address. But if the setting is *:80, then that domain appears to inherit the settings of the first (alphabetically) domain I have configured, rather than its own! I think this is consistent with the way Apache configuration is designed to work, but I can't figure out what is causing this address to change from to .
I did see this change when I enabled the "SSL Website Enabled" feature, when it added a entry -- and this can't be right! That caused the non-ssl (port 80) access to begin defaulting to the "first" domain again!
It seems to want to change this setting every time I try to change anything in webserver configuration, and I have to manually edit the /etc/apache2/sites-enabled/domain.com.conf file to fix it.
What is happening? I'm on Virtualmin 5.07, webmin 1.831.
Comments
Submitted by andreychek on Mon, 04/10/2017 - 22:30 Comment #1
Howdy -- that could mean that there's another Apache config file located in /etc/apache2/sites-enabled that has the "*:80" setup.
You'd want to ensure that all of them are using "x.x.x.x:80".
What output do you receive when running this command:
grep -i '<virtualhost' /etc/apache2/sites-enabled/*.conf
Submitted by creeble on Tue, 04/11/2017 - 15:53 Pro Licensee Comment #2
Hey Andrey. Yes, I see one .conf that has *:80 -- so I should change that manually?
Also the 000-default.conf file has *:80 -- is that used?
Another slightly weird thing is that two of 23 .conf files in sites-available are 750 instead of 644 (mode). Not clear at all how they got that way; I never did a chmod to them. Should they all be 644?
Submitted by andreychek on Tue, 04/11/2017 - 22:30 Comment #3
I wouldn't change the permissions on the files, but the VirtualHost line is something I'd tweak.
I'd suggest running "a2dissite 000-default", and then change the remaining one with *:80 to x.x.x.x:80.
Submitted by creeble on Mon, 04/17/2017 - 21:56 Pro Licensee Comment #4
Thanks mucho Andrey. Fixed the *:80's and all looks good now; can update settings and nothing gets reset.
Submitted by andreychek on Mon, 04/17/2017 - 22:14 Comment #5
Excellent, I'm glad to hear that's working for you now!
Feel free to let us know if you have any additional questions.
Submitted by IssueBot on Sat, 07/15/2017 - 19:42 Comment #7
Automatically closed - issue fixed for 2 weeks with no activity.