singh763173 Posted November 25, 2011 Share Posted November 25, 2011 Hi all, Im new to Linux web hosting and I am currently testing to see how easy it is to setup. Although its been pretty simple so far, im struggling with virtualhosts (atleast thats what I have been reading up on. http://www.linuxselfhelp.com/apache/manual/vhosts/name-based.html I have setup two sites like in the example NameVirtualHost 111.22.33.44 <VirtualHost 111.22.33.44> ServerName www.domain.tld DocumentRoot /www/domain </VirtualHost> <VirtualHost 111.22.33.44> ServerName www.otherdomain.tld DocumentRoot /www/otherdomain </VirtualHost> but when going to the sites, i get a 404 error. The requested URL / was not found on this server. Am I doing something wrong here? :( Using apache2 and latest Ubuntu Quote Link to comment Share on other sites More sharing options...
singh763173 Posted November 25, 2011 Author Share Posted November 25, 2011 (edited) ok ok, rookie mistake - changed it to /var/www/domain works now :) EDIT Okay so I have an actual question now. I have setup a VM with VirtualBox and have assigned a static IP so that i can access it from within my network. But question now is, if i just want to be able to access it from this computer so that I can roam around with this laptop and have access to this webserver whereever I am - how would I configure the NIC? I assume it would need to be NAT but what do I change the eth0 interface settings to on the ubuntu box itself? At present, it has a valid network ip and its gateway points to my router. Thanks Edited November 25, 2011 by singh763173 Quote Link to comment Share on other sites More sharing options...
singh763173 Posted November 25, 2011 Author Share Posted November 25, 2011 Think I may have figured it that out too ! Changed the NIC to Host Only and then changed the IP address of the Host Only adapter to the same subnet of my W7 machine. and I can access the sites hosted on the Linux box. 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.