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

softyun3年前服务器47

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

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

相关文章

Apache 多端口多站点配置方法

配置httpd.conf监听多个端口复制代码 代码如下:# Listen: Allows you to bind Apache to specific IP addresses and/or# por...

phpStudy运行帝国备份王出错解决方法

这篇文章主要为大家详细介绍了phpStudy运行帝国备份王出错解决方法,具有一定的参考价值,感兴趣的小伙伴们可以参考一下,有需要的朋友可以收藏方便以后借鉴。昨天在本地还原数据库的时候用到了帝国备份王,...

域名出售怎么开始,域名出售方案分享

1.什么是域名出售?域名出售是指不需要该域名的所有者将其从自己的账户上转移到其他人的名下,以售卖获利。2.域名出售的原因该域名可能已经买下,但是万一没有用到的时候,它进入了需要出售的状态。域名交易市场...

Service Temporarily Unavailable的503错误是怎么回事?

一般来说,出现Service Temporarily Unavailable错误多半是因为网站访问量大,造成了流量超限或者并发数大引起的资源超限出现的错误。解决的方法一个是升级空间到更佳配置,要么就是...

让Apache支持shtml实现include文件解析的配置方法

1. 确认加载include.so模块,将注释去掉:LoadModule include_module libexec/apache2/mod_include.so2. AddType部分去掉这两段注...

HTTP 错误 403.1禁止访问:禁止执行访问的完美解决方法

HTTP 错误 403.1 - 禁止访问:执行访问被拒绝。解决方法该页无法显示您试图从目录中执行 CGI、ISAPI 或其他可执行程序,但该目录不允许执行程序。请尝试以下操作:如果您认为该目录应该允许...