国产欧美日韩第一页|日本一二三不卡视频|在线精品小视频,亚洲第一免费播放区,metcn人体亚洲一区,亚洲精品午夜视频

幫助中心 >  技術(shù)知識(shí)庫(kù) >  網(wǎng)站相關(guān) >  建站知識(shí) >  apache 多端口配置及網(wǎng)站指向非apache默認(rèn)的網(wǎng)站文件夾設(shè)置方法

apache 多端口配置及網(wǎng)站指向非apache默認(rèn)的網(wǎng)站文件夾設(shè)置方法

2015-10-26 10:39:22 6038

  • 首先我們需要開啟 Virtual hosts,進(jìn)入Apache2.2conf目錄下的httpd.conf文件,用搜索查找 Virtual hosts,并且將

Include conf/extra/httpd-vhosts.conf前個(gè)“#"刪除保存。

  • 在Apache的配置文件httpd-vhosts.conf下進(jìn)行操作,位置在Apache安裝目錄下的Apache2.2confextra文件中。如圖

  • 用文本文檔打開httpd-vhosts.conf文件

添加如下紅色部分,默認(rèn)情況下只有80端口。下面代碼中每個(gè)顏色對(duì)應(yīng)的響應(yīng)對(duì)口的設(shè)置和目錄。
#
# 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 doesnt need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://www.tjdsmy.cn/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 *:80
NameVirtualHost *:81
NameVirtualHost *:82
NameVirtualHost *:83
NameVirtualHost *:84
NameVirtualHost *:85
NameVirtualHost *:86

NameVirtualHost *:88
#
# 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.com
         DocumentRoot D:/AppServ/www/www-nongye
         ServerName www.tjdsmy.cn
         ErrorLog D:/AppServ/www/www-nongye/errornongye.log
         CustomLog logs/dummy-host2.appservnetwork.com-access_log common
</VirtualHost>
<VirtualHost *:82>
    <Directory "D:/AppServ/www-chinaec" >
        Options FollowSymLinks
        #Deny from all
        Allow from all
    </Directory>
         ServerAdmin jsw7001@hotmail.com
         DocumentRoot D:/AppServ/www-chinaec
         ServerName www.tjdsmy.cn
     DirectoryIndex index.php index.html
         ErrorLog D:/AppServ/www-chinaec/errornongjiale.log
         CustomLog logs/dummy-host2.appservnetwork.com-access_log common
</VirtualHost>
<VirtualHost *:83>
         ServerAdmin jsw7001@hotmail.com
         DocumentRoot D:/AppServ/www/www-05110
         ServerName www.tjdsmy.cn
         ErrorLog D:/AppServ/www/www-05110/errornong05110.log
         CustomLog logs/dummy-host2.appservnetwork.com-access_log common
</VirtualHost>
<VirtualHost *:84>
         ServerAdmin jsw7001@hotmail.com
         DocumentRoot D:/AppServ/www/wordpress
         ServerName www.tjdsmy.cn
         ErrorLog D:/AppServ/www/wordpress/errornongwordpress.log
         CustomLog logs/dummy-host2.appservnetwork.com-access_log common
</VirtualHost>
<VirtualHost *:85>
         ServerAdmin jsw7001@hotmail.com
         DocumentRoot D:/AppServ/www/magento
         ServerName www.tjdsmy.cn
         ErrorLog D:/AppServ/www/magento/errormagento.log
         CustomLog logs/dummy-host2.appservnetwork.com-access_log common
</VirtualHost>
<VirtualHost *:86>
         ServerAdmin jsw7001@hotmail.com
         DocumentRoot D:/AppServ/www/magento1322
         ServerName www.tjdsmy.cn
         ErrorLog D:/AppServ/www/magento1322/errormagento1322.log
         CustomLog logs/dummy-host2.appservnetwork.com-access_log common
</VirtualHost>
<VirtualHost *:88>
         ServerAdmin jsw7001@hotmail.com
         DocumentRoot D:/AppServ/www/www-nongjiale
         ServerName www.tjdsmy.cn
         ErrorLog D:/AppServ/www/www-nongjiale/errornongjiale.log
         CustomLog logs/dummy-host2.appservnetwork.com-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>


這樣保存后,就完成我們不同端口的建設(shè)。





提交成功!非常感謝您的反饋,我們會(huì)繼續(xù)努力做到更好!

這條文檔是否有幫助解決問題?

非常抱歉未能幫助到您。為了給您提供更好的服務(wù),我們很需要您進(jìn)一步的反饋信息:

在文檔使用中是否遇到以下問題: