apache配置

apache的配置路径在C:\wamp\bin\apache\apache2.4.9\conf\extra下的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

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值