WAMP_多站点_多域名_VHOSTS

一.E:\wampserver\bin\apache\Apache2.2.21\Apache2.2.21\conf\httpd.conf

找到:

#   onlineoffline tag - don't remove
    Order Deny,Allow
    Deny from all
    Allow from 127.0.0.1

改为:

#   onlineoffline tag - don't remove
    Order Deny,Allow
    Deny from all
    Allow from all

 

找到:#Include conf/extra/httpd-vhosts.conf

改为:Include conf/extra/httpd-vhosts.conf

 

二.E:\wampserver\bin\apache\Apache2.2.21\conf\extra\httpd-vhosts.conf

添加:

<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot "E:/wampserver/www"
    ServerName localhost
    ServerAlias localhost
    ErrorLog "logs/localhost.log"
    CustomLog "logs/localhost.log" common
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot "E:/wampserver/www"
    ServerName 127.0.0.1
    ErrorLog "logs/localhost.log"
    CustomLog "logs/localhost.log" common
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot "D:/Program tools/WampServer/www"
    ServerName localhost
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot "D:/My Object"
    ServerName myobject
    <Directory "D:/My Object">
        Options Indexes FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot "D:/My Object/Rxcms"
    ServerName rxcms.com
    ServerAlias *.rxcms.com
    <Directory "D:/My Object/Rxcms">
        Options Indexes FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>

 

三.C:\Windows\System32\drivers\etc\host

添加:

127.0.0.1       www.tktest.com

127.0.0.1       test.com

你可能感兴趣的:(WAMP_多站点_多域名_VHOSTS)