apache虛擬主機(jī)配置一例
更新時(shí)間:2013年02月09日 20:20:35 作者:
apache虛擬主機(jī)配置一例,有需要的朋友可以參考下
復(fù)制代碼 代碼如下:
fivetrees extra # cat httpd-vhosts.conf_bak
#
# 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:http://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 *:80
#NameVirtualHost *:443
#
# 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 192.168.1.66>
# RewriteEngine On
# RewriteMap lowercase int:tolower
# RewriteMap vhost txt:/usr/local/apache/conf/host.txt
# RewriteCond %{HTTP_HOST} !^$
# RewriteCond ${lowercase:%{HTTP_HOST}|NONE} ^(.+)$
# RewriteRule ^/(.*...)$ ${vhost:%1...}/$1
#</VirtualHost>
<VirtualHost *:80>
DocumentRoot /opt/all_dir
ServerName *
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /opt/1
ServerName 1.com
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /opt/2
ServerName 2.com
</VirtualHost>
#<VirtualHost *:443>
# DocumentRoot /home/hello
# ServerName hello.baidu.com
#</VirtualHost>
您可能感興趣的文章:
- apache虛擬主機(jī)三種配置方式小結(jié)
- 在Apache服務(wù)器上添加虛擬主機(jī)功能的方法
- 給Apache虛擬主機(jī)增加端口的方法
- apache服務(wù)器一個(gè)ip(如:127.0.0.1)和多個(gè)域名(虛擬主機(jī))的綁定
- apache虛擬主機(jī)的配置指南
- apache中使用mod_gnutls模塊實(shí)現(xiàn)多個(gè)SSL站點(diǎn)配置(多個(gè)HTTPS協(xié)議的虛擬主機(jī))
- apache配置虛擬主機(jī)的方法詳解
- 13個(gè)實(shí)用的Apache Rewrite重寫(xiě)規(guī)則
- Apache偽靜態(tài)Rewrite詳解
- Apache Rewrite實(shí)現(xiàn)URL的301跳轉(zhuǎn)和域名跳轉(zhuǎn)
- Apache Rewrite url重定向功能的簡(jiǎn)單配置
- 用ISAPI_Rewrite讓IIS也支持如Apache下.htaccess的URL重寫(xiě)
- Apache中Virtual Host虛擬主機(jī)配置及rewrite參數(shù)說(shuō)明
相關(guān)文章
Ubuntu修改密碼及密碼復(fù)雜度策略設(shè)置方法
這篇文章主要介紹了Ubuntu修改密碼及密碼復(fù)雜度策略設(shè)置,方法,本文給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2020-08-08Vim如何使用相對(duì)行號(hào)實(shí)現(xiàn)一切操作詳解
在使用用Vim時(shí)時(shí)常會(huì)遇到像復(fù)制多行或者想快速向下/向上移動(dòng)多行時(shí)而不知道行數(shù)的情況, 今天發(fā)現(xiàn)一個(gè)Vim對(duì)此有幫助的特性: 相對(duì)行號(hào),下面這篇文章主要給大家介紹了關(guān)于Vim如何使用相對(duì)行號(hào)實(shí)現(xiàn)一切操作的相關(guān)資料,需要的朋友可以參考下。2017-11-11Linux實(shí)現(xiàn)科學(xué)上網(wǎng)
本文給大家介紹的是Linux下使用plink ssh + privoxy 實(shí)現(xiàn)局域網(wǎng)共享代理,非常的全面細(xì)致,這里推薦給大家。2015-03-03Ubuntu 安裝Eclipse 菜單無(wú)法使用解決辦法
這篇文章主要介紹了Ubuntu 安裝Eclipse 菜單無(wú)法使用解決辦法的相關(guān)資料,需要的朋友可以參考下2017-03-03Linux中如何查看已掛載的文件系統(tǒng)類(lèi)型詳解
這篇文章主要給大家介紹了關(guān)于在Linux中如何查看已掛載的文件系統(tǒng)類(lèi)型的相關(guān)資料,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧2018-11-11