Mobile app version of vmapp.org
Login or Join
Shelton105

: Apache Virtual Host does not work 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:

@Shelton105

Posted in: #Apache #Localhost #Virtualhost #Windows7 #Xampp

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 apacheconfextra
httpd.conf in apacheconf
hosts in system32driversetc


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:xampphtdocsmypage
ServerName mypage
DirectoryIndex index.html index.php
<Directory "C:xampphtdocsmypage">
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.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Shelton105

1 Comments

Sorted by latest first Latest Oldest Best

 

@Murphy175

You must


Read Apache docs
Understand Apache docs
Select better-suited module for virtual-hosts for your needs (from at least two)
Enable selected module in LoadModule
Restart Apache after editing configs

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme