Apache 多站點(diǎn)虛擬主機(jī)配置方法
更新時(shí)間:2009年07月23日 17:06:51 作者:
Apache 多站點(diǎn)虛擬主機(jī)配置方法, 有這類需要的朋友可以參考下。
修改配置文件 conf/httpd.conf
1.加入下面兩句
NameVirtualHost *:80
Include conf/vhosts
2.在conf目錄中建立vhosts目錄
然后在 vhosts 目錄下面建立相應(yīng)的站點(diǎn)配置文件
如建立 hhj.jb51.net.conf 文件
內(nèi)容:
<VirtualHost *:80>
ServerAdmin hhj@live.it
ServerName www.hhj.jb51.net
ServerAlias hhj.jb51.net
DocumentRoot "F:\wwwroot\hhj.jb51.net"
DirectoryIndex index.html index.htm index.php
ErrorLog logs/hhj.jb51.net-error_log.log
CustomLog logs/hhj.jb51.net-access_log.log common
<Directory "F:\wwwroot\hhj.jb51.net">
AllowOverride All
Options FollowSymLinks
Order Deny,Allow
Allow from all
</Directory>
</VirtualHost>
3.重啟apache服務(wù)
1.加入下面兩句
NameVirtualHost *:80
Include conf/vhosts
2.在conf目錄中建立vhosts目錄
然后在 vhosts 目錄下面建立相應(yīng)的站點(diǎn)配置文件
如建立 hhj.jb51.net.conf 文件
內(nèi)容:
復(fù)制代碼 代碼如下:
<VirtualHost *:80>
ServerAdmin hhj@live.it
ServerName www.hhj.jb51.net
ServerAlias hhj.jb51.net
DocumentRoot "F:\wwwroot\hhj.jb51.net"
DirectoryIndex index.html index.htm index.php
ErrorLog logs/hhj.jb51.net-error_log.log
CustomLog logs/hhj.jb51.net-access_log.log common
<Directory "F:\wwwroot\hhj.jb51.net">
AllowOverride All
Options FollowSymLinks
Order Deny,Allow
Allow from all
</Directory>
</VirtualHost>
3.重啟apache服務(wù)
相關(guān)文章
基于centos7 安裝python3.6.4出錯(cuò)的解決方法
下面小編就為大家分享一篇基于centos7 安裝python3.6.4出錯(cuò)的解決方法,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過來看看吧2018-01-01CentoS6.5環(huán)境下redis4.0.1(stable)安裝和主從復(fù)制配置方法
這篇文章主要介紹了CentoS6.5環(huán)境下redis4.0.1(stable)安裝和主從復(fù)制配置方法,結(jié)合實(shí)例形式分析了CentoS6.5下redis4.0.1的安裝和主從復(fù)制配置相關(guān)步驟、命令與操作注意事項(xiàng),需要的朋友可以參考下2018-04-04虛擬機(jī)安裝Linux rhel7.3操作系統(tǒng)(具體步驟)
這篇文章主要介紹了虛擬機(jī)安裝Linux rhel7.3操作系統(tǒng)(具體步驟),文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2019-10-10SSH遠(yuǎn)程登錄和端口轉(zhuǎn)發(fā)詳解
這篇文章主要介紹了關(guān)于SSH遠(yuǎn)程登錄和端口轉(zhuǎn)發(fā)的相關(guān)資料,文中介紹的非常詳細(xì),需要的朋友可以參考借鑒,下面來一起看看吧。2017-03-03rsync中文手冊(cè)之使用rsync實(shí)現(xiàn)網(wǎng)站鏡像和備份linux
用rsync實(shí)現(xiàn)網(wǎng)站鏡像和備份 雖然是linux下的操作,但原理和windows下類似2008-09-09Linux中將.c文件轉(zhuǎn)換為可執(zhí)行文件的方法
在 Linux 環(huán)境下進(jìn)行 C 語言編程時(shí),將 .c 文件轉(zhuǎn)換為可執(zhí)行文件是一個(gè)關(guān)鍵的步驟,這個(gè)過程涉及到使用編譯器和一些相關(guān)的工具,本文將詳細(xì)介紹在 Linux 系統(tǒng)中如何將 .c 文件轉(zhuǎn)換為可執(zhí)行文件的方法,需要的朋友可以參考下2024-08-08