I've problems setting up a virtual host on windows7, so that I can develop multiple pages on my localhost. To set up the virtual Host, I've edited 3 Files:
- httpd-vhosts.conf in apache\conf\extra
- httpd.conf in apache\conf
- hosts in system32\drivers\etc
This is what I've done in order to make the page run on Port 81:
added this block in httpd-vhosts.conf
NameVirtualHost *:81
<VirtualHost *:81>
DocumentRoot C:\xampp\htdocs\mypage
ServerName mypage
DirectoryIndex index.html index.php
<Directory "C:\xampp\htdocs\mypage">
Options Indexes FollowSymLinks Includes ExecCGI
Order allow,deny
Allow from all
AllowOverride All
</Directory>
</VirtualHost>
made apache Listen on Port 81 in httpd.conf
Listen 80
Listen 81
added this line in hosts
127.0.0.1 mypage
But as soon as I try to access mypage via localhost:81, I get redirected to localhost/xampp.
httpd.conf
is it properly loadinghttpd-vhosts.conf
? Or is that line commented out?