精品久久久网站_日本不卡免费新一二三区_日韩高清成人_久久久久久久久久久久网站_一区二区三区不卡在线_99国产精品99久久久久久

合肥網站建設
文章閱讀
網建技巧
優化技巧
網建問題
謹宸新聞
行業新聞

首頁 > 合肥網站建設 > 正文

教你如何用apache同ip多站點架設

發布時間:2011/05/01字體:
摘要:教你如何用apache同ip多站點架設,apache同ip多站點架設,告訴您如何用apache同ip多站點架設,apache同ip多站點架設,告訴您如何用apache同ip多站點架設。這里是指同一IP綁定N個域名,有二種方式實現方法1、僅修改httpd.conf假設二個域名bbs.xxx.c
這里是指同一IP綁定N個域名,有二種方式實現
方法1、僅修改httpd.conf
假設二個域名bbs.xxx.com與blog.xxx.com
打開httpd.conf
將文件拖到最下面,加上


view plaincopy to clipboardprint?
 
 ServerName bbs.xxx.com   #域名  
 DocumentRoot "F:/website/bbs"   #該域名對應的目錄地址    
   #該節點是配置權限、默認首頁啊等等東東。  
 Options FollowSymLinks IncludesNOEXEC Indexes  
 DirectoryIndex  index.php   
 AllowOverride None   
 Order Deny,Allow   
 Allow from all      
 
 
 
 
 ServerName blog.xxx.com  
 DocumentRoot "D:/PHPSite/wordpress"  
   
 Options FollowSymLinks IncludesNOEXEC Indexes  
 DirectoryIndex  index.php   
 AllowOverride None   
 Order Deny,Allow   
 Allow from all   
 
 


 ServerName bbs.xxx.com   #域名
 DocumentRoot "F:/website/bbs"   #該域名對應的目錄地址 
   #該節點是配置權限、默認首頁啊等等東東。
 Options FollowSymLinks IncludesNOEXEC Indexes
 DirectoryIndex  index.php
 AllowOverride None
 Order Deny,Allow
 Allow from all   




 ServerName blog.xxx.com
 DocumentRoot "D:/PHPSite/wordpress"

 Options FollowSymLinks IncludesNOEXEC Indexes
 DirectoryIndex  index.php
 AllowOverride None
 Order Deny,Allow
 Allow from all



重啟apache,就OK啦。當然你要修改你的hosts文件。

方法2、修改\PhpServer\Apache2.2\conf\extra\httpd-vhosts.conf
直接將上面一段copy到httpd-vhosts.conf的最后即可。
實際上看名字就知道httpd-vhosts.conf是一個虛擬站點配置集中地,方便管理。
也就是如下:
view plaincopy to clipboardprint?
#  
# 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   
#  
# 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  
 
#  
# 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 block.  
#  
 
 
 
 ServerName bbs.xxx.com   #域名  
 DocumentRoot "F:/website/bbs"   #該域名對應的目錄地址    
   #該節點是配置權限、默認首頁啊等等東東。  
 Options FollowSymLinks IncludesNOEXEC Indexes  
 DirectoryIndex  index.php   
 AllowOverride None   
 Order Deny,Allow   
 Allow from all      
 
 
 
 
 
 ServerName blog.xxx.com  
 DocumentRoot "D:/PHPSite/wordpress"  
   
 Options FollowSymLinks IncludesNOEXEC Indexes  
 DirectoryIndex  index.php   
 AllowOverride None   
 Order Deny,Allow   
 Allow from all   
 
 

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

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



 ServerName bbs.xxx.com   #域名
 DocumentRoot "F:/website/bbs"   #該域名對應的目錄地址 
   #該節點是配置權限、默認首頁啊等等東東。
 Options FollowSymLinks IncludesNOEXEC Indexes
 DirectoryIndex  index.php
 AllowOverride None
 Order Deny,Allow
 Allow from all   





 ServerName blog.xxx.com
 DocumentRoot "D:/PHPSite/wordpress"

 Options FollowSymLinks IncludesNOEXEC Indexes
 DirectoryIndex  index.php
 AllowOverride None
 Order Deny,Allow
 Allow from all



重啟apache。
如果不行的話,看你的httpd.conf是否啟用了vhost
打開httpd.conf,找到
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
看是否啟用,即去掉Include conf/extra/httpd-vhosts.conf前的#
重啟apache,爽去吧。
本文標題:教你如何用apache同ip多站點架設
本文網址:http://www.txiashuidao.com/wangjianjiqiao/39.html
原創網址:合肥網絡公司<謹宸科技> 版權所有,轉載請注明出處,并以鏈接形式鏈接網址:www.txiashuidao.com
文章標簽:apacheip站點架設
 上一篇:教你怎樣策劃項目融資書
 下一篇:放出本人收集的一些php常用小技巧
主站蜘蛛池模板: 精品入口麻豆 | 黄色的软件大全 | 中文字幕第一区 | 激情五月婷婷综合 | 日韩中文字| 97人洗澡人人澡人人爽人人模 | 欧美 日韩 国产 成人 在线观看 | 日本视频一区在线观看免费 | 二区三区不卡不卡视频 | 日本私人网站在线观看 | 亚洲一区二区三区免费视频 | www.youjizz.com在线观看 | 青青操在线视频 | 黄色大片免费网站 | 亚洲欧美日韩中文综合v日本 | 免费一区二区三区免费视频 | 免费观看黄色毛片 | 久草视频福利资源站 | 亚洲日本va午夜中文字幕一区 | 久草观看视频 | 久久久久一 | 国产精品拍自在线观看 | 久久伊人精品综合观看99 | 欧美综合亚洲 | 日本色黄 | 亚洲国产三级 | 99热这里只有精品国产99 | 黑人精品videos亚洲人 | 毛片视频免费观看 | 国产a国产片国产 | 久久香蕉精品 | 激情视频网站 | 欧美系列在线 | 久久人人青草97香蕉 | 青青在线视频免费观看 | 午夜色a大片在线观看免费 午夜色福利 | 99热在线只有精品 | 日本视频不卡 | 亚洲第一区视频在线观看 | 国产三级a三级三级 | 九草在线播放 |