简体   繁体   中英

virtual hosts WAMP server

I am trying to setup virtual wamp localhost.

Localhost
root folder: c:\\wamp\\www

mysite.local
root folder: c:\\wamp\\site2

Steps of every kind is already taken: removing # from file "httpd.conf"

#Include conf/extra/httpd-vhosts.conf

addition in httpd-vhosts.conf:

<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot "c:/wamp/www"
ServerName localhost
ErrorLog "logs/localhost-error.log"
CustomLog "logs/localhost-access.log" common 
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "c:/wamp/site2"
ServerName mysite.local
<directory "c:/wamp/site2">
    Options Indexes FollowSymLinks
    AllowOverride all
    Order Deny,Allow
    Deny from all
    Allow from 127.0.0.1
</directory>
</VirtualHost>

addition in hosts file:

127.0.0.1    mysite.local

problem is, in either case i get to www root folder through localhost or mysite.local. ANy solution?

//httpd.conf

>LoadModule vhost_alias_module modules/mod_vhost_alias.so 

Delete the comment icon (#), it may help.

Now use WAMP Latest Version 3 And create Virtual Host from Localhost web page directly. After Register the Virtual Host just restrat the WAMP server.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM