+ -
当前位置:首页 → 问答吧 → 问大家一个特别的APACHE配置--急急!!!!!!

问大家一个特别的APACHE配置--急急!!!!!!

时间:2010-07-14

来源:互联网

服务器有系统为 DEBIAN5 APACHE2。2。9
IP 有两个  

分别A IP 给一部分虚拟站点用  BIP 给一个ZIMBRA 邮件系统用 但是这个邮件系统因为要通过主系统的80端口代理访问 所以我的配置 如下:

目录
/ETC/APACHE2

SITES-ENADM/ pra.conf     zimbra.conf   000-default

三个虚拟站点配置文件

000-default
如下:
<VirtualHost *:80>
        ServerAdmin webmaster@localhost

        DocumentRoot /var/www/
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>

        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>

        ErrorLog /var/log/apache2/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog /var/log/apache2/access.log combined

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

</VirtualHost>

PORT。CONF

如下:
#If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default
# This is also true if you have upgraded from before 2.2.9-3 (i.e. from
# Debian etch). See /usr/share/doc/apache2.2-common/NEWS.Debian.gz and
# README.Debian.gz

NameVirtualHost 218.16.10.23:80

NameVirtualHost 218.16.10.24:80

Listen 80

<IfModule mod_ssl.c>
    # SSL name based virtual hosts are not yet supported, therefore no
    # NameVirtualHost statement here
    Listen 443
</IfModule>

PRA.CONF  如下:

<VirtualHost 218.16.10.23:80>
    DocumentRoot "/var/www/pra.com/bbs/"
    Options -Indexes
    ServerName bbs.pra.com
    ServerAdmin [email protected]
    ErrorLog /var/log/apache2/bbs.pra.com-error.log
    CustomLog /var/log/apache2/bbs.pra.com-access.log combined
</VirtualHost>



<VirtualHost 218.16.10.23:80>
    DocumentRoot "/var/www/pra.com/faqv3"
    Options -Indexes
    ServerName faqv3.pra.com
    ServerAdmin [email protected]
    ErrorLog /var/log/apache2/faqv3.pra.com-error.log
    CustomLog /var/log/apache2/faqv3.pra.com-access.log combined
</VirtualHost>


ZIMBRA。CONF 如下:

<VirtualHost 218.16.10.24:80>
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://127.0.0.1:88/
ProxyPassReverse / http://127.0.0.1:88/
</VirtualHost>

但是现在遇到一个问题

PRA。CONF里面的虚拟站点都可以访问
但是我解析别的域名比如mail.bBC.com 到218.16.10.24 就死活访问不了?
但是用系统本身的主机名 比如 mail.abc.com 就可以访问ZIMBRA邮件页面

我想实现的效果是  PRA。CONF 里面的虚拟主机站点可以访问 然后任何域名解析到218.16.10.24 都可以访问 并且相互不干扰 请问该怎么配置
?急啊

作者: hondasky   发布时间: 2010-07-14

首先确定这两个IP都在你这个机器里设置了,如果只设置一个IP当然只能是一个IP生效

作者: er_shi   发布时间: 2010-08-21

热门下载

更多