Results 1 to 5 of 5
I have two pcs, one running win xp and other RHEL v.4 with apache configured.
Both are connected via cross cable.
on the linux machine there is a file called ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 11-23-2006 #1Just Joined!
- Join Date
- Nov 2006
- Posts
- 8
virtual host on apache on p2p network
I have two pcs, one running win xp and other RHEL v.4 with apache configured.
Both are connected via cross cable.
on the linux machine there is a file called index.html in /var/www/html
which i am able to access by typing http://192.168.1.20 in the browser on my windows machine.( as linux machine has ip 192.168.1.20 : PLEASE NOTE THAT I HAVENT CONFIGURED DOMAIN NAME SYSTEM)
Is it posiible to set up virtual hosts so that i can access more than one site without setting up DNS?
If yes can anyone please tell me how?
- 11-23-2006 #2Just Joined!
- Join Date
- Nov 2006
- Location
- Vienna,Austria
- Posts
- 4
You can set up Virtual Host on different Ports and have one host an port 80 and anpther one on 81 as example - the apache docs have very good examples for that.
http://httpd.apache.org/docs/1.3/vhosts/examples.html
- 11-24-2006 #3Just Joined!
- Join Date
- Nov 2006
- Posts
- 8
the extract below is from the httpd.conf file.
Well my main concern is since i havent set up DNS what should i enter in the
server name field of each virualhost below. suppose if i want to access website called site1 which is located in
/var/www/site1 and site2 located in /var/www/site2
Listen 80
NameVirtualHost 192.168.1.20
<VirtualHost 127.0.0.1>
ServerName 192.168.1.20
DocumentRoot /var/www/site1
</VirtualHost>
<VirtualHost 127.0.0.1>
ServerName ????????
DocumentRoot /var/www/site2
</VirtualHost>
192.168.1.20 is the ip adrress of my linux machine which i will be accessing from windows.
when i type
http://192.168.1.20 i get site 1
how to i get site 2?
- 11-24-2006 #4Just Joined!
- Join Date
- Nov 2006
- Location
- Vienna,Austria
- Posts
- 4
...
--http://httpd.apache.org/docs/1.3/vhosts/examples.htmlCode:Port 80 ServerName server.domain.tld NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot /www/domain ServerName www.domain.tld ... </VirtualHost> <VirtualHost *:80> DocumentRoot /www/subdomain ServerName www.sub.domain.tld ... </VirtualHost>
try omitting the ServerName
- 11-24-2006 #5Just Joined!
- Join Date
- Nov 2006
- Posts
- 8
well it does seem to work at times, but not always, i think ill have to configure DNS now.
I queried google for DNS but there wernt any articles for DNS configuration for two computers connected by cross cable.
If you have any links please send me some


Reply With Quote
