zoukankan      html  css  js  c++  java
  • apache配置

    apache的配置路径在C:wampinapacheapache2.4.9confextra下的httpd-vhosts.conf中:

    1.配置:

    <VirtualHost *:80>
        ServerAdmin webmaster@dummy-host.example.com
        DocumentRoot "e:/www/PropertyCenter/02 coding/04 customer system-web"      
        ServerName web.zongkong.com
        #ServerAlias www.dummy-host.example.com
        #ErrorLog "logs/dummy-host.example.com-error.log"
        #CustomLog "logs/dummy-host.example.com-access.log" common
        
        <Directory "e:/www/PropertyCenter/02 coding/04 customer system-web">
            Options Indexes FollowSymLinks
            AllowOverride all
            Order allow,deny
            Allow from all
        </Directory>
    
        <IfModule mod_rewrite.c>
            RewriteEngine on
              RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
            RewriteRule .* - [F]
              Rewriterule ^(.*)/(.*)/index.html$ $1/index.php?$2
            Rewriterule ^(.*)/(.*)/index(d+).html$ $1/index.php?$2&page=$3
            Rewriterule ^(.*)/(.*)/a(d+).html$ $1/index.php?$2/$3
            Rewriterule ^(.*)/u/(d+)/(.*)$ $1/index.php?u&$2&$3
            Rewriterule ^(.*)/u/(d+)/(.*)/$ $1/index.php?u&$2&$3
            Rewriterule ^(.*)/u/(d+)$ $1/index.php?u&$2
            Rewriterule ^(.*)/u/(d+)/$ $1/index.php?u&$2
            Rewriterule ^(.*)/(.*)/index.html?(.*) $1/index.php?$2&$3
            Rewriterule ^(.*)/(.*)/index(d+).html?(.*) $1/index.php?$2&$3
            Rewriterule ^(.*)/index.action(.*) $1/index.php$3
        </IfModule>
        
    </VirtualHost>
    <VirtualHost  *:80>
        DocumentRoot  "D:/www/Admin/app/webroot/"
        ServerName web.admin.com
    </VirtualHost>
    
    <VirtualHost  *:80>
        DocumentRoot  "D:/www/FrontDesk/app/webroot/"
        ServerName web.rongbei.com
    </VirtualHost>

    2,打开Apache的安装目录,找到httpd.conf文件,分别去掉下面两行文字前面的#号。  
    LoadModule vhost_alias_module modules/mod_vhost_alias.so
    去掉#意思是启用apache的虚拟主机功能。  
    Include conf/extra/httpd-vhosts.conf  
    去掉这一行的#意思是从conf/extra/httpd-vhosts.conf这个文件导入虚拟主机配置。

    3.httpd.conf

  • 相关阅读:
    NC105 二分查找
    Spark-Streaming总结
    spark java API 实现二次排序
    在eclipse上安装Scala插件
    maven:missing artifact jdk.tools:jar:1.7
    使用 Hive装载数据的几种方式
    Eclipse debug 调试快捷键
    yarn工作流程
    Windows 7 下安装mysql-5.7.18-winx64.zip
    希尔排序
  • 原文地址:https://www.cnblogs.com/yangzailu/p/6586026.html
Copyright © 2011-2022 走看看