virtual directory - apache configuration - what am I missing here? -
I have a Windows XP machine, Apache installed on C: \ Program Files \ Apache Software Foundation \ Apache 2.2
I have set the document root to document root as "C: / projects" in httpd.conf and my projects in proj1 and proj2 in c: \ projects
& lt; VirtualHost *: 80 & gt; DocumentRoot "C: / projects / proj1" servername proj1 & lt; / VirtualHost & gt; & Lt; VirtualHost *: 80 & gt; DocumentRoot "C: / projects / proj2" server name proj2 & lt; / VirtualHost & gt;
Both proj1 and proj2 have index.php files. I
127.0.0.1 PROJE 1
127.0.0.1 PROJE2
Also in the host file
Still, when I type, I only list the files, the virtual directory is not working, what am I missing? In addition to restarting / reloading Apache, there are a few other things to check:
First, the "post-text" itemprop = "text" Here are examples of valid vhost configurations:
& lt; VirtualHost *: 80 & gt; ServerName ProZ1 DocumentRoot "c: / www / proj1" & lt; Directory "c: / www / proj1" & gt; AllowOverride Allow all orders, Deny from all & lt; / Directory & gt; & Lt; / VirtualHost & gt; & Lt; VirtualHost *: 80 & gt; ServerName ProZ2 DocumentRoot "c: / www / proj2" & lt; The directory "c: / www / proj2" & gt; AllowOverride Allow all orders, Deny from all & lt; / Directory & gt; & Lt; / VirtualHost & gt;
Note how both proj1
and proj2
have both their own VirtualHost
instructions.
Secondly, make sure that the vhosts announcements are being loaded by the Apache. For my work, I had to assign this line to httpd.conf
: # virtual hosts conf / extra / httpd-vhosts.conf
Comments
Post a Comment