XAMPP多站点配置httpd-vhosts.conf文件

# Virtual Hosts
#
# Required modules: mod_log_config

# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at 
# 
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# Use name-based virtual hosting.
#
NameVirtualHost *:80
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ##ServerName or ##ServerAlias in any  block.
#


    ServerAdmin [email protected]
    DocumentRoot "E:/XAMPPServer/htdocs/"
    ServerName localhost
    ServerAlias localhost
    ErrorLog "logs/localhost-error.log"
    CustomLog "logs/localhost-access.log" common


Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all



    ServerAdmin [email protected]
    DocumentRoot "D:/SunWorkSpace/WebWorkSpace/WordPress"
    ServerName www.sudons.com
    ServerAlias www.sudons.com
    ErrorLog "logs/www.sudons.com-error.log"
    CustomLog "logs/www.sudons.com-access.log" common


Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all



    ServerAdmin [email protected]
    DocumentRoot "D:/SunWorkSpace/WebWorkSpace/ShopNC"
    ServerName www.shopnc.com
    ServerAlias www.shopnc.com
    ErrorLog "logs/wwww.shopnc.com-error.log"
    CustomLog "logs/www.shopnc.com-access.log" common


Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all



    ServerAdmin [email protected]
    DocumentRoot "D:/SunWorkSpace/WebWorkSpace/TPShop"
    ServerName www.tpshop.com
    ServerAlias www.tpshop.com
    ErrorLog "logs/www.tpshop.com-error.log"
    CustomLog "logs/www.tpshop.com-access.log" common


Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all



    ServerAdmin [email protected]
    DocumentRoot "D:/SunWorkSpace/WebWorkSpace/Ecshop"
    ServerName www.ecshop.com
    ServerAlias www.ecshop.com
    ErrorLog "logs/www.ecshop.com-error.log"
    CustomLog "logs/www.ecshop.com-access.log" common


Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all

注意:

配置多站点后,如果页面访问出现403错误,打开httpd.conf文件,大概230行位置,找到:
AllowOverride all
Require all denied
改成:
AllowOverride all
Require all granted

你可能感兴趣的:(XAMPP多站点配置httpd-vhosts.conf文件)