chronister Posted April 21, 2007 Share Posted April 21, 2007 I am trying to migrate from a windows machine running XAMPP to an actual LAMP server. UBUNTU 6.10. I got apache installed along with php and mysql. I then proceeded to set up V-hosts because I test multiple websites on my local network as well as permanently host an intranet site for my wife (address book, calendar, recipes, etc......). I spent days trying to get them to work. I finally managed to get the names to respond and serve the proper pages in the directories, but everytime I restart apache after making a config change I get the following errors. [Fri Apr 20 21:09:27 2007] [warn] NameVirtualHost jen:0 has no VirtualHosts [Fri Apr 20 21:09:27 2007] [warn] NameVirtualHost blogw:0 has no VirtualHosts [Fri Apr 20 21:09:27 2007] [warn] NameVirtualHost music:0 has no VirtualHosts [Fri Apr 20 21:09:27 2007] [warn] NameVirtualHost a:0 has no VirtualHosts [Fri Apr 20 21:09:27 2007] [warn] NameVirtualHost k:0 has no VirtualHosts [Fri Apr 20 21:09:27 2007] [warn] NameVirtualHost nate2:0 has no VirtualHosts <error block is repeated once more > My /etc/apache2/sites-enabled/default file looks like this. ServerName * NameVirtualHost nate <VirtualHost nate> ServerName nate DocumentRoot /var/www/nate </VirtualHost> NameVirtualHost jen <VirtualHost jen> ServerName jen DocumentRoot /var/www/jen </VirtualHost> NameVirtualHost blogw <VirtualHost blogw> ServerName blogw DocumentRoot /var/www/wordpress </VirtualHost> NameVirtualHost music <VirtualHost music> ServerName music DocumentRoot /var/www/music </VirtualHost> NameVirtualHost a <VirtualHost a> ServerName a DocumentRoot /var/www/phpMyAdmin </VirtualHost> NameVirtualHost k <VirtualHost k> ServerName k DocumentRoot /var/www/karaoke </VirtualHost> NameVirtualHost nate2 <VirtualHost nate2> ServerName nate2 DocumentRoot /var/www/nate_new </VirtualHost> I am sure that there are some problems or errors here and it's probably a miracle that the machine is responding to these names, so can someone shed some light on what I am missing here?? thanks in advance. Quote Link to comment Share on other sites More sharing options...
Guest prozente Posted April 21, 2007 Share Posted April 21, 2007 NameVirtualHost is used to specify where you want to listen for using Name-based virtual hosting so if you only had one IP address and two sites you'd have something like this: Listen 10.0.0.1 NameVirtualHost 10.0.0.1 <VirtualHost 10.0.0.1> ServerName first.example.com DocumentRoot /var/www/first/html </VirtualHost> <VirtualHost 10.0.0.1> ServerName second.example.com DocumentRoot /var/www/second/html </VirtualHost> Quote Link to comment Share on other sites More sharing options...
chronister Posted April 21, 2007 Author Share Posted April 21, 2007 Thank you. Although your solution did not work directly I was able to play around and find what did work. I changed made the following items. I also removed the extra NameVirtualHost lines. I think that is what Apache was bitchin about anyway. ServerName Linux NameVirtualHost 192.168.0.13 Thanks for your help. I can now restart with no errors or warnings. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.