Add a virtual host to WAMP I get a 403

Posted on 2009-05-01
Last Modified: 2012-05-06
I am trying to add a Virtual host to my local development envoirment so that I can have changes to the code tested from my workspace.

I followed the instrutions in here

Essentially I did the following ....

1.I added the following to the http.conf
    DocumentRoot C:/hourville/myfiles/
    ServerName yourdomain.local
    ErrorLog C:/wamp/bin/apache/Apache2.2.11/logs/error.log
    TransferLog C:/wamp/bin/apache/Apache2.2.11/logs/access.log
Then added the follwing in the hosts files at  
C:\WINDOWS\system32\drivers\etc      yourdomain.local

3.Tried to access it by

I get a 403 ...
Question by:micro_learner
    LVL 20

    Expert Comment

    Why Don't you want
    Or try *
    LVL 18

    Expert Comment

    by:Sudaraka Wijesinghe
    Do you have directory index file and settings configured correctly?

    DirectoryIndex index.htm
    and place index.htm in C:\hourville\myfiles
    LVL 49

    Expert Comment

    Have you also added a
    LVL 30

    Expert Comment

    does it work if you use the ip address
    LVL 49

    Expert Comment

    403 means forbidden. So apache knows where to find the files, it only will not host the files because you have probably not the right allow from/deny from settings on the virtual host directory. So you probably have to add

    <Directory "C:/hourville/myfiles/">
      Order allow,deny
      Allow from all
    LVL 8

    Accepted Solution

    you need to make some changes

    1. change to ip for vh from <VirtualHost> to <VirtualHost *:80> w/ 80 is default web server port and also make sure to add exception for that port in all firewalls/antivirus; check here for idea

    2. make sure to have folder logs in folder C:/wamp/bin/apache/Apache2.2.11

    3. if your web folder is outside your main document root which already configured in main config file, you need to add exception as Roonaan pointed out

    Actually, if using wampserver, you should follow my guide here

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
    If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
    The viewer will learn how to count occurrences of each item in an array.
    The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now