Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

**UPDATE- I got it working now, I just had to change to The port number is important here.

I just modified my windows HOST file @ C:\Windows\System32\drivers\etc

and added this to the end of it images.localhost friendproject.-com

Then I modified my httpd-vhosts.conf file on Apache under Xampp @ C:\webserver\apache\conf\extra

Under the part where it shows examples for adding virtualhost I added this code below:

NameVirtualHost *:80

<VirtualHost *:80>
    DocumentRoot /htdocs/images/
    ServerName images.localhost

<VirtualHost *:80>
    DocumentRoot /htdocs/

<VirtualHost *:80>
    DocumentRoot /htdocs/
    ServerName w-ww-.friendproject.c-om/

Now the problem is when I go to any of the newly added domains in the browser I get this error below and even worse news is I now get this error even when going to http://localhost/ which worked fine before doing this

I realize I can change everything back but I really need to at least get htt-p://im-ages.localhost to work.

What do I do?

Access forbidden! You don't have permission to access the requested directory. There is either no index document or the directory is read-protected. If you think this is a server error, please contact the webmaster . Error 403 localhost 07/25/09 21:20:14 Apache/2.2.11 (Win32) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8i PHP/5.2.9

share|improve this question
up vote 0 down vote accepted

Sounds like you're trying to access a directory instead of a file. Try with a url of some image, or add "Options +Indexes" to your apache conf to have it show directory listings

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.