+ -
当前位置:首页 → 问答吧 → apache 多网站配置问题请教

apache 多网站配置问题请教

时间:2010-11-30

来源:互联网

我现在有多个网站放到一台apache服务器上,其中有一个是有域名的,绑定这台服务器的外网ip地址比如123.456.78.9
我现在已经配置好了使用域名访问的站点,如下:

NameVirtualHost *:80 
<VirtualHost *:80>  
  ServerName www.abc.com  
  DocumentRoot "E:/PHP"
</VirtualHost>  

我想通过使用外网IP地址123.456.78.9访问服务器上的其他站点,使用域名访问上面配置好的站点。
这样能实现吗?请高手指教

我现在如果输入IP地址,访问的也是有域名的这个站点
我想使用 http://123.456.78.9/项目文件夹 这种方式访问其他站点,该怎么配置呢
多谢

作者: niangao119   发布时间: 2010-11-30

XML code
    <!--域名1-->
      <Host name="jsxymgh.3322.org"  appBase="webapps"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">
                <!--默认访问-->
                <Context path ="" debug="0" docBase ="/test1" reloadable="true" privileged="true">
                </Context>
      </Host>
    <!--域名2-->
      <Host name="chinamgh.3322.org"  appBase="D:/1"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">
                <!--默认访问-->
                <Context path ="" debug="0" docBase ="/test2" reloadable="true" privileged="true">
                </Context>
      </Host>

        <Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">
      </Host>

作者: jsxymgh   发布时间: 2010-12-07

热门下载

更多