Forum Moderators: phranque
XpucTo
DocumentRoot /home
NameVirtualHost 00.00.00.00<VirtualHost *>
ServerName www.example.com
DocumentRoot /home/example.com
</VirtualHost><VirtualHost *>
ServerName www.example2.com
DocumentRoot /home/example2.com
</VirtualHost>
So if i type 00.00.00.00.00 I get the index.php of my example.com instead of the one from my DocumentRoot. And if I type 0.00.00.00.00/example.com/index.php, it doesn't find anything.
my webpointing is www.example.com -> myIP
File does not exist: /home/favicon.ico
Now I've diseabled all my virtualhosts.
So http://www.example.com and http://www.example2.com are pointing to my IP addresse, DocumentRoot is /home, ServerName is my IP (I tried also with nothing) and that's it I guess.
When I typed now http://www.example.com or http://www.example2.com I get index.html that is located in /home (my DocumentRoot), this is correct, BUT if I give
www.example(2).com/anotherindex.html or www.example(2).com/subdir/file.php, then I still get this index.html!
[edited by: jdMorgan at 7:35 pm (utc) on Feb. 18, 2006]
[edit reason] formatting [/edit]
I'd suggest that you try one of the example configurations given in the Apache Name-based Virtual Host Support [httpd.apache.org] document and the documents that it links to.
After you get it working, then modify it and test one step at a time to suit your needs.
Jim