Forum Moderators: phranque

Message Too Old, No Replies

Virtual Host Setup

Cannot get virtual hosts to work/finf the files

         

kirwood

2:08 pm on Jun 12, 2012 (gmt 0)

10+ Year Member


I am quite new to Apache and have the following problem.
I want to use Apache as a local server on a Windows platform on which to develop a database driven web site.
I have installed Apache on c drive using xampp. Localhost shows me the xampp home page. Using phpmyadmin I have installed the database and all is well. It is a clean, fresh installation and I am assuming thus far all is correct.
The directory holding the relevant files I want to preview is on d drive d:/kim
I have set up virtual hosts on windows by
a) modifying the hosts file to include
127.0.0.1 localhost
127.0.0.1 kim

and b) modifying the httpd.conf file to include
# Virtual hosts
Include "conf/extra/httpd-vhosts.conf"

and httpd-vhosts.conf to include
<VirtualHost *:80>
DocumentRoot c:/xampp/htdocs
ServerName localhost
</VirtualHost>

<VirtualHost *:80>
DocumentRoot d:/kim
ServerName kim (I also tried localhost here)
</VirtualHost>

<Directory D:/>
Order Deny,Allow
Allow from all
</Directory>

typing in the url for index.html (http://example(kim))produces a 404 The requested URL was not found on this server.

I guess it is some sort of configuration error on my part but I cannot see it. Help appreciated.

phranque

2:59 am on Jun 14, 2012 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



welcome to WebmasterWorld, kirwood!

your server error log should give a the file path the server is attempting to access.
perhaps that will give you some clues.