This website is deprecated, and remains online only for historic access to old issues and docs for historic versions of Virtualmin. It has been unmaintained for several years, and should not be relied on for up-to-date information. Please visit www.virtualmin.com instead.
As I review my various Virtualmin systems, they all show what you're describing in Webmin -> Services -> Apache -- in there they all show that Apache is listening on "Any" IP and "Any" port.
That doesn't cause any interference with how the server works, especially after setting a preferred Virtual Server as the default (which can be done in Server Configuration -> Website Options).
You mentioned that you were having a problem setting up Varnish -- what problem are you having exactly?
I get from apachectl -t: NameVirtualHost x.x.x.x:80 has no VirtualHosts 3 times, for the IPs ending in 197, 195 and 35. I used the supplied script. I could also do a search and replace on httpd.conf to try to avoid this, but the article specifically mentions not to manipulate httpd.conf outside of Virtualmin.
Besides the conf error, all sites stopped working. I reverted quickly to the default setup (it's a production server)
My apologies, I mis-understood the context of what you were describing.
You should not have a VirtualHost block containing Any IP/Port.
We run into a lot of folks who end up with one of those, for one reason or another, and they do cause problems.
However, the default Apache config you're describing there is normal.
If you change the port that Apache is running on, you would also need to update the port listed in your various VirtualHost blocks in your Apache config, as well as the port listed in that "NameVirtualHost" line that's generating the warning that you're seeing.
Well, you don't actually have a VirtualHost with any/any, you're just seeing a standard Apache configuration.
That is, when you see that in Webmin, Webmin is just telling you that Apache is listening for incoming connections on 0.0.0.0, on whatever ports are defined in there.
That's the correct setup.
If you had a VirtualHost that was defined like this, this would be a problem:
<VirtualHost *:80>
That's not the case though -- your setup is correct.
To add Varnish into your setup, you would need to make sure you update all the references in Apache to port 80, to whatever other port Apache is listening on.
Also, you'd need to make sure that Varnish is accessing your domains using the IP address they're configured with.
If you have a domain "example.com", and Apache is configured to listen for that on IP x.x.x.x (typically the eth0 interface, or your public IP address) -- if Varnish attempted to access IP 127.0.0.1, that wouldn't work, as Apache isn't looking for "example.com" to be on 127.0.0.1.
Howdy,
You shouldn't need a default server listening on any IP/Port. In fact, having one would likely cause problems.
Are you having problems of some sort? If so, can you describe them?
-Eric
You could say I am having problems, I could not install a SSL cert via virtualmin, only manually. https://www.virtualmin.com/node/30756
I dont know if that is related to the issue referenced in this post I can't even delete this default server:
any word of advice, andrey?
Well, you seem to be seeing some unusual issues, and I unfortunately don't seem to be able to reproduce any of them.
Your issues with SSL shouldn't be related to having a virtual host listening on any port though.
That just means that there's a "VirtualHost" entry in your Apache config that contains a "*:80", meaning that it's set to listen for all IP addresses.
Virtualmin wouldn't have set that up -- you may need to manually remove that entry from your Apache config if you wish to get rid of it.
It'd be no problem to remove that though (or to comment it out) -- and once you do, just restart Apache afterwards.
-Eric
I changed the beginning of the conf from http://ideone.com/H7yYnR to http://ideone.com/qdzTJw and restarted apache. I still had a default server listening on Any:Any.
(after the snips above, the containers began, and NONE had asterisks before or after the colon)
please advise.
As I review my various Virtualmin systems, they all show what you're describing in Webmin -> Services -> Apache -- in there they all show that Apache is listening on "Any" IP and "Any" port.
That doesn't cause any interference with how the server works, especially after setting a preferred Virtual Server as the default (which can be done in Server Configuration -> Website Options).
You mentioned that you were having a problem setting up Varnish -- what problem are you having exactly?
-Eric
I was going by what you said earlier "You shouldn't need a default server listening on any IP/Port. In fact, having one would likely cause problems."
Varnish should be the only one listening on 80. If I have a default server listening on any IP/Port, it (might) be also listening on 80, which is a problem for Varnish. I followed the instructions at http://badlywired.com/technical-stuff/2013/09/27/setting-up-varnish-with...
I get from
apachectl -t
:NameVirtualHost x.x.x.x:80 has no VirtualHosts
3 times, for the IPs ending in 197, 195 and 35. I used the supplied script. I could also do a search and replace on httpd.conf to try to avoid this, but the article specifically mentions not to manipulate httpd.conf outside of Virtualmin.Besides the conf error, all sites stopped working. I reverted quickly to the default setup (it's a production server)
Thanks
My apologies, I mis-understood the context of what you were describing.
You should not have a VirtualHost block containing Any IP/Port.
We run into a lot of folks who end up with one of those, for one reason or another, and they do cause problems.
However, the default Apache config you're describing there is normal.
If you change the port that Apache is running on, you would also need to update the port listed in your various VirtualHost blocks in your Apache config, as well as the port listed in that "NameVirtualHost" line that's generating the warning that you're seeing.
-Eric
Thanks. How do I remove that any/any vhost from virtualmin and apache?
Well, you don't actually have a VirtualHost with any/any, you're just seeing a standard Apache configuration.
That is, when you see that in Webmin, Webmin is just telling you that Apache is listening for incoming connections on 0.0.0.0, on whatever ports are defined in there.
That's the correct setup.
If you had a VirtualHost that was defined like this, this would be a problem:
<VirtualHost *:80>
That's not the case though -- your setup is correct.
To add Varnish into your setup, you would need to make sure you update all the references in Apache to port 80, to whatever other port Apache is listening on.
Also, you'd need to make sure that Varnish is accessing your domains using the IP address they're configured with.
If you have a domain "example.com", and Apache is configured to listen for that on IP x.x.x.x (typically the eth0 interface, or your public IP address) -- if Varnish attempted to access IP 127.0.0.1, that wouldn't work, as Apache isn't looking for "example.com" to be on 127.0.0.1.
-Eric