User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Linux Servers and Apache section within the Tech Talk category of DaniWeb, a massive community of 456,452 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,623 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Linux Servers and Apache advertiser: Programming Forums
Views: 923 | Replies: 2
Reply
Join Date: Aug 2007
Posts: 181
Reputation: tanha is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
tanha tanha is offline Offline
Junior Poster

Apache VirtualHost IP-Based "Winodws"

  #1  
Jun 17th, 2008
Hi.
I am using WAMP which including the following:
PHP 5...
MySQL 5...
Apache 2...

I want to create IP-Based VirtualHost, therefore I did the following:
1. add "Microsoft Loopback Adapter", and I assign two IP on that.
2. Create two folders named (host1, host2) in my root directory which is www. and for sure inside those two folders I place some php files.
3. and I add the following in my httpd.conf
#********************************* VIRTUAL HOSTING BY IP
Listen 127.0.0.1:8081

Listen 192.168.1.1:8081

Listen 192.168.1.2:8081

NameVirtualHost 192.168.1.1:8081
NameVirtualHost 192.168.1.2:8081

<VirtualHost 192.168.1.1:8081>
	DocumentRoot "C:\wamp\www\host1"
	ServerName host1.com
</VirtualHost>

<VirtualHost 192.168.1.2:8081>
	DocumentRoot "C:\wamp\www\host2"
	ServerName host2.com
</VirtualHost>


#********************************* VIRTUAL HOSTING BY IP

4. and then I added the following in the hosts file
127.0.0.1     localhost
192.168.1.1 host1.com
192.168.1.2 host2.com

5. open the browser and type the following address
http://host1.com:8081/
I get the following error:
Forbidden

You don't have permission to access / on this server.

I don't know what to do? anyone please guide me

P.S:
I am working on my own computer, it means I am not in any Network or on the Internet, so I did not use the real computer adapter, because it is unplugged, and therefore I add Microsoft Loopback Adapter
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Aug 2007
Posts: 181
Reputation: tanha is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
tanha tanha is offline Offline
Junior Poster

Re: Apache VirtualHost IP-Based "Winodws"

  #2  
Jun 18th, 2008
any idea plz ???
Reply With Quote  
Join Date: Jan 2008
Posts: 28
Reputation: atlex2 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 3
atlex2 atlex2 is offline Offline
Light Poster

Re: Apache VirtualHost IP-Based "Winodws"

  #3  
Jul 7th, 2008
Throw this inside each individual virtual host:

**** Between these lines***

AllowOverride All
Order allow,deny
Allow from all

****^^^*****

Also, if your going to want www.site.com you should alias it or make site.com an alias.

info from config file:
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Linux Servers and Apache Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Other Threads in the Linux Servers and Apache Forum

All times are GMT -4. The time now is 2:05 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC