New Servers Are Broken?

A few weeks ago, I had no problems creating Virtual Servers for top-level domains.

Now, I just registered a new domain and it failed. Curious, I deleted one of my Virtual Servers that I wasn’t really using and recreated it. It didn’t work.

The problem is that it must be pointing them to some other location besides /home/domainName/public_html/. To test this, I did:

$ echo "PLEASE WORK!!!" > /home/domainName/public_html/index.html

and then loaded up the site. I still just see the "Index of /" page that shows the awstats-icon and icon folders.

Please, I really, really need this to work soon. Any advice? Thanks in advance.

So, the problem is that it creates Virtual Servers – with no errors – but that when you access the associated domain, you aren’t seeing the content you’d expect?

If you log in over SSH, and restart Apache, do you see any errors or warnings?

Also, do the Apache logs help at all?

For example, when you access domainName.com, do you see anything show up in /home/domainName/logs/access_log and /home/domainName/logs/error_log?

What about the system Apache log in /var/log, does it have anything that clarifies what’s going on?
-Eric

I restarted Apache with "apache2ctl graceful" and saw no errors. The contents of both of those files are empty. The /var/log/apache2/access.log is empty and errors.log has nothing useful.

Your first paragraph is accurate. I am only seeing the default stuff.

And older Virtual Servers continue to work fine? They have messages in the logs?

Would you be able to attach two Apache VirtualHost blocks – one being an example of one that works, the other being an example that does not work?

Feel free to alter the names of the domains from whatever they are to something like example_works.com and example_broke.com if you’d like to hide the actual domain names.
-Eric

The old ones work fine.

Working: http://pastebin.com/d20393841
Not working: http://pastebin.com/d5bd1a4d6

Domain names are altered, obviously.

I really appreciate the help so far.

Okay.

I’m not sure what might have changed this, but I suspect the issue is due to the top line in the VirtualHost definition. Those shouldn’t ever have *'s in them, it should always list the IP address.

That is, you want this:

<VirtualHost 72.14.177.xxx:80>

not this:

<VirtualHost *:80>

If you manually change the * in the VirtualHost that doesn’t work to your IP address, then restart Apache, does that work as you’d expect then?
-Eric

You are a god among men, sir. If I could give you a pat on the back, I would. Thanks so, so, so, so much!

I’m glad to help :slight_smile:

The next step is to figure out why it’s doing that in the first place – you not should have to manually edit the Apache config whenever a Virtual Server is added.

Is there by chance a line like "NameVirtualHost *" in the Apache config somewhere?

If so, I suspect that’s the issue… I suspect Virtualmin is trying to be smart and match that – but that’s just causing issues, as you see :wink:

If there is such a line, I’d comment it out and restart Apache. It should be good from then on!
-Eric