Amjad Posted December 14, 2006 Report Share Posted December 14, 2006 Haye I am using uniform server 3.3 its working fine and excellent on my local machine with localhost...but when i tried to host multiple domains upon it goes undergrouond means stopped working...as mentioned in different articles i had modified httpd.conf & hosts file in my apache as well as windows folder but it'snt seems to be worked..why it is? I put the following text in my httpd.conf file;NameVirtualHost *:80 <VirtualHost *:80> ServerName skylink DocumentRoot "www/skylink" </VirtualHost> after putting it i had edited the hosts file in windows directory and at the end it looks like that;# 102.54.94.97 rhino.acme.com # source server# 38.25.63.10 x.acme.com # x client host 127.0.0.1 localhost127.0.0.1 localhost:80127.0.0.1 skylink # Skylink test after doing that i had started my uniserver and typed http://skylink it said document not found (but i had placed each & everything there in www directory & skylink directory) when i tried it by just typing http://localhost same error document not find even though it's same on writting http://127.0.0.1..Why its doing so..please any one if knows the right place.....as i had read the whole documentation... please tell me here or mail me.....i shall be very thankful to you.. Quote Link to comment Share on other sites More sharing options...
MrX Posted December 15, 2006 Report Share Posted December 15, 2006 ...NameVirtualHost *:80 ServerName skylink DocumentRoot "www/skylink" ...You could try to replace DocumentRoot "www/skylink" with DocumentRoot /www/skylink Quote Link to comment Share on other sites More sharing options...
Amjad Posted December 15, 2006 Author Report Share Posted December 15, 2006 You could try to replace DocumentRoot "www/skylink" with DocumentRoot /www/skylink THANKS MRX i did the same but the problem persists...when i uses it on a single pc it works fine but when i connects my pc with local interanet it goes on finding & finding...i am using ISA server at my main server maching with Ip 192.168.0.1 & on ip 192.168.0.2 i want to make my own virtual host but it seems workless...all my efforts are vain to do so..i had read the related apache config pages & somehow uniformserver pages too but nothing could solve this problem..please help me how to do so....how to edit my hosts file what ip i'll have to give over there for my localhost or any server name i choose... Quote Link to comment Share on other sites More sharing options...
Ric Posted December 15, 2006 Report Share Posted December 15, 2006 If you have not changed these lines in config:Listen 80ServerName localhost:80 and (Towards the end of the config file) made sure this line is uncommented: NameVirtualHost * Then this is correct ServerName skylinkDocumentRoot "www/skylink" Every thing arriving at port 80 will be passed to the server for checking On the local machine the hosts file contains:127.0.0.1 skylink # Skylink test The browsers resolves skylink to address 127.0.0.1 from the hosts file and then adds: 80 It then requests the page by outputing IP address 127.0.0.1:80 so whatever is on the localcal machine and listing to port 80 receives this request. Well in this case the Apache server, it cannot match a server name of “localhost” and passes it to the Virtual host block where it matches a server named “skylink” (contained in the header) and gets it output from folder www/skylink. Now if you have the same hosts file on a remote machine. When the browser comes to resolve the name “skylink” it will resolve to 127.0.0.1:80 not the intention since the server resides on 192.168.0.2 so on this remote machine the hosts entry should be 192.168.0.2 skylink # Skylink test The browser now resolves “skylink” to 192.168.0.2:80 and outputs a page request to your virtual server machine. Hope that makes sense Quote Link to comment Share on other sites More sharing options...
MrX Posted December 16, 2006 Report Share Posted December 16, 2006 ... ServerName skylinkDocumentRoot "www/skylink" ...One question, Ric, if you use "www/skylink", Apache looks for W:\www\www\skylink but if you use "/www/skylink", Apache looks for W:\www\skylink, am I right? Quote Link to comment Share on other sites More sharing options...
Ric Posted December 16, 2006 Report Share Posted December 16, 2006 Thanks MrX you are indeed correct it should read: ServerName skylinkDocumentRoot "/www/skylink" Quote Link to comment Share on other sites More sharing options...
MrX Posted December 27, 2006 Report Share Posted December 27, 2006 You're welcome 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.