apche 多端口配置及网站指向非apche默认的网站文件夹设置方法

softyun3年前服务器135

#
# Virtual Hosts
#
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:httpd.apache.org/docs/2.2/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# Use name-based virtual hosting.
#
NameVirtualHost *:81
NameVirtualHost *:82
NameVirtualHost *:83
NameVirtualHost *:84
NameVirtualHost *:85
NameVirtualHost *:86
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
<VirtualHost *:81>
         ServerAdmin jsw7001@hotmail
         DocumentRoot D:/AppServ/www/www-nongye
         ServerName dede
         ErrorLog D:/AppServ/www/www-nongye/errornongye.log
         CustomLog logs/dummy-host2.appservnetwork-access_log common
</VirtualHost>
<VirtualHost *:82>
    <Directory "D:/AppServ/www-chinaec" >
        Options FollowSymLinks
        #Deny from all
        Allow from all
    </Directory>
         ServerAdmin jsw7001@hotmail
         DocumentRoot D:/AppServ/www-chinaec
         ServerName dede
     DirectoryIndex index.php index
         ErrorLog D:/AppServ/www-chinaec/errornongjiale.log
         CustomLog logs/dummy-host2.appservnetwork-access_log common
</VirtualHost>
<VirtualHost *:83>
         ServerAdmin jsw7001@hotmail
         DocumentRoot D:/AppServ/www/www-05110
         ServerName dede
         ErrorLog D:/AppServ/www/www-05110/errornong05110.log
         CustomLog logs/dummy-host2.appservnetwork-access_log common
</VirtualHost>
<VirtualHost *:84>
         ServerAdmin jsw7001@hotmail
         DocumentRoot D:/AppServ/www/wordpress
         ServerName dede
         ErrorLog D:/AppServ/www/wordpress/errornongwordpress.log
         CustomLog logs/dummy-host2.appservnetwork-access_log common
</VirtualHost>
<VirtualHost *:85>
         ServerAdmin jsw7001@hotmail
         DocumentRoot D:/AppServ/www/magento
         ServerName dede
         ErrorLog D:/AppServ/www/magento/errormagento.log
         CustomLog logs/dummy-host2.appservnetwork-access_log common
</VirtualHost>
<VirtualHost *:86>
         ServerAdmin jsw7001@hotmail
         DocumentRoot D:/AppServ/www/magento1322
         ServerName dede
         ErrorLog D:/AppServ/www/magento1322/errormagento1322.log
         CustomLog logs/dummy-host2.appservnetwork-access_log common
</VirtualHost>
<VirtualHost *:88>
         ServerAdmin jsw7001@hotmail
         DocumentRoot D:/AppServ/www/www-nongjiale
         ServerName dede
         ErrorLog D:/AppServ/www/www-nongjiale/errornongjiale.log
         CustomLog logs/dummy-host2.appservnetwork-access_log common
</VirtualHost>
<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host2.x
    DocumentRoot "C:/Apache2.2/docs/dummy-host2.x"
    ServerName dummy-host2.x
    ErrorLog "logs/dummy-host2.x-error.log"
    CustomLog "logs/dummy-host2.x-access.log" common
</VirtualHost>

免责声明:本文内容来自用户上传并发布,站点仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。请核实广告和内容真实性,谨慎使用。

相关文章

什么是共享主机,一种实惠的网站托管方案

共享主机是一种网站托管方案,通过将多个网站托管到同一台服务器上,实现资源共享,降低成本,使得网站托管变得更加实惠。共享主机通常提供了丰富的功能和工具,比如网站构建器、邮件服务器、数据库等等,方便网站管...

服务器硬件配置有哪些要素,如何选择合适的服务器硬件配置

1.什么是服务器硬件配置?服务器硬件配置是指服务器硬件组成及配备的相关参数,主要包括中央处理器(CPU)、随机存储器(RAM)、硬盘、网卡等主要硬件组件。2.CPUCPU是服务器的核心,也是供给主板处...

CentOS下Lighttpd Web服务器安装与配置方法

OS: CentOS release 5.5Lighttpd: 1.4.28安装sudo yum install lighttpd.i386 lighttpd-fastcgi.i386 lighttp...

什么是国内免备案空间,国内免备案空间的优点和限制

在网络托管中,网站备案是一个重要的步骤。备案是指将网站信息报备至相关部门,由其核实网站信息的真实性和合法性,完成备案后便可以正式上线运营。然而,备案需要提交大量资料,并且审批过程耗时,给网站的运营造成...

phpstudy2018 访问目录服务权限问题

上篇文章给大家介绍了phpStudy2019安装教程及本地服务器的配置方法,需要的可以点击查看。今天更新phpstudy2019,安装后访问路径出现You don't have permiss...

宝塔面板安装后必要的安全设置说明

为了便于服务器的 WEB 应用和管理,我们大部分用户会依托 WEB 面板,在国内外可选择的面板还是比较多的,因为宝塔面板的简单易用,越来越多的人开始转用宝塔面板,尤其是一些刚刚接触服务器的朋友,宝塔面...