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

softyun3年前服务器51

#
# 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>

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

相关文章

宝塔面板下安装svn版本管理(Centos)

Centos安装命令:(安装宝塔面板)yum install -y wget && wget -O install.sh download.bt/install/install_6.0...

宝塔面板安装云锁Nginx自编译web防护教程(绝对有效)

  为什么要自编译安装云锁?  宝塔面板安装云锁后,开启WEB防护,会导致网站打不开的情况,而云锁并不支持http的网站的防护, 所以我们可以直接编译一个WEB防护模块,和云锁防护功能是一模一样的,另...

.htaccess使用方法总结

.htaccess是Apache服务器的一个非常强大的分布式配置文件。正确的理解和使用.htaccess文件,可以帮助我们优化自己的服务器或者虚拟主机。比如可以利用.htaccess文件创建自定义的“...

htaccess 将所有请求重定向到某个URL地址的规则

复制代码 代码如下:RewriteEngine OnRewriteCond %{REQUEST_URI} !=/tempIndexRewriteRule ^ /tempIndex [R=301]...

Windows环境开发PHP完整配置教程Apache+Mysql+PHP

软件准备:主要讲解Apache,Mysql,PHP,以及PhpMyAdmin的安装配置。开发工具自备。Apache的安装:注:本例只截取需要注意的截图,其它默认则不显示。1.服务器信息可以按照默认配置...

备案域名查询是什么,如何使用备案域名查询工具

备案域名查询是一种用于查询域名备案信息的工具。在我国,所有运营网站的网站主需要进行备案,并在备案信息中提交域名信息。备案网站可以查询到该网站主使用的域名备案信息,包括域名所有人、联系方式、备案编号、备...