Sign in to follow this  
Followers 0
.solo

Apache Config - Virtual Hosts

5 posts in this topic

I recently updated a system that hadn't been administered for quite some time and apache stopped working properly. After 600+ megabytes and over 400 updates the server started pointing virtual host traffic to https, which the server wasn't using. I checked the config and the virtual hosts was setup as:

NameVirtualHost *

<VirtualHost *>

#...

</VirtualHost>

After trying the alternative *:80, I fixed the problem by specifying the IP addresses and port instead of using the catch all asterisk wildcard; however, I had to write a search and replace script to fix around 50 virtual host configuration files in a directory.

I am plagued by curiosity as to why the configuration stopped working after months and months of proper operation, and need a more concrete answer for my boss. I am leaning towards the deprecation of that method, but even that seems improbable. I have googled (yeah it is a verb) the hell out of it, to no avail. It doesn't help that whoever configured it didn't to do a very clean upgrade to apache2 as per config migration.

I realize this is a very specific problem, but if anyone has any ideas or even a better google search, I would be much obliged.

0

Share this post


Link to post
Share on other sites

I am not quite sure what your problem is as I need more information.

The * tells httpd to listen on all interfaces.

Was DNS used OR was /etc/hosts used to resolve names?

0

Share this post


Link to post
Share on other sites

The hosts file should have been resolving it, there was a valid entry matching that of the ServerName directive in the apache configuration.

0

Share this post


Link to post
Share on other sites

fuck, I misread your question.

As for the answer you are looking for, I don't know

That seems odd, but somewhere something must have been configured incorrectly.

Just tell your boss it was a conflict between the previous and updated package. That it had overwritten, blah blah.

Which it could very well have been the problem.

Edited by schippystrich
0

Share this post


Link to post
Share on other sites
I recently updated a system that hadn't been administered for quite some time and apache stopped working properly. After 600+ megabytes and over 400 updates the server started pointing virtual host traffic to https, which the server wasn't using. I checked the config and the virtual hosts was setup as:

It's possible one of the updates installed a default virtualhost which was overriding your custom config - you didn't specify what distro you were using there, so it's hard to say how your config should be laid out, each distro does it slightly differently. Was the SSL page loading, or just timing out, or giving an error or anything?

You might want to grep through your config for anything like SSLEngine On.

apache2ctl -S should show you all the configured virtual hosts which might point you in the right direction.

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0