0

I've got some kind of strange problem with my VirtualHost settings. I think maybe some wrong file is loaded, or anything - I'm not sure and I can not spot the problem - or have found an appropriate solution.

vhosts is simply configured like that:

NameVirtualHost *:80

<VirtualHost *:80>
   DocumentRoot "/x/y/z"
   ServerName first.one
</VirtualHost>

<VirtualHost *:80>
   DocumentRoot "/x/y/z"
   ServerName second.one
</VirtualHost>

[...]

and it was working perfectly fine. But now I've deleted one / added a new one with a different name, and it's not recognized. But the old one I deleted is.

I've restarted and restarted, almost anything and everything a few hundred times... searched for different/multiple config files and such... but I've got no clue.

How could I search? What to search for? Where may this result from? Anyone an idea?

Thanks in advance!!

1
  • Are these domains entirely separate, or are they subdomains of one main domain (which is also present as a virtual host)? It would really help if you didn't obfuscate your configuration.
    – Jenny D
    Feb 8, 2013 at 8:50

1 Answer 1

0

How could you search : First, you must ensure that the file you're editing is used by Apache upon restart. For that, add a deliberate error syntax to the file. If Apache restarts fine, then the file is not processed.

Second, you should stop Apache, verify that you can't access port 80, then start again. Then, rename all Apache config files one by one, until Apache can't start. So you know which config file is really used.

Where this may result from : the file you edit is not used by the instance of Apache currently running.

2
  • Thanks for your answer! But unfortunately I've tried all this. If put some corrupt entries inside and I've got an error. If I stop apache - I can't access any of them / webserver is really stopped. I can change the document root of the others and it's recognized... If I'm running a syntax check - it's also said the syntax is correct. Only new entries are not recognized? So I'm asking myself, what am I overlooking? Could there be any other reason? Any setting?
    – irr.licht
    Feb 8, 2013 at 8:37
  • If so, how do you define that it's not working? What do you get in error logs? There are so many "maybe"s, like "Is the document root accessible?". Error logs are the second best bet.
    – DotMG
    Feb 8, 2013 at 17:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .