zoukankan      html  css  js  c++  java
  • apache服务器多端口支持

    本示例支持80,82两端口

    修改conf/httpd.conf文件:

    Listen 80

    改为

    Listen 80
    Listen 82
    # Virtual hosts
    #Include conf/extra/httpd-vhosts.conf

    改为

    # Virtual hosts
    Include conf/extra/httpd-vhosts.conf

    修改conf/extra/httpd-vhosts.conf

    <VirtualHost *:80>
        DocumentRoot "C:/xampp/htdocs"
        ServerName localhost
        ErrorLog "logs/error.log"
        CustomLog "logs/access.log" common
    </VirtualHost>
    
    <VirtualHost *:82>
        DocumentRoot "D:/web"
        ServerName localhost
        ErrorLog "logs/error.log"
        CustomLog "logs/access.log" common
    </VirtualHost>

    开启httpd-vhosts.conf配置文件后,xampp会报Access forbidden的错误,需要修改conf/httpd.conf文件:

    <Directory />
        AllowOverride none
        Require all denied
    </Directory>

    改为:

    <Directory />
        AllowOverride none
        #Require all denied
        Order deny,allow
        Allow from all
    </Directory>
  • 相关阅读:
    事件委托
    a标签深入研究
    windows查看端口号
    什么是WCM
    map key循环
    用Myeclipse打war包
    myeclipse 8.510.0 安装 svn 方法
    SVN使用&CVS使用
    MyEclipse 字体大小 字体颜色
    什么是Quickr
  • 原文地址:https://www.cnblogs.com/modou/p/5310877.html
Copyright © 2011-2022 走看看