apache虛擬主機(jī)配置一例
更新時間: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ù)器一個ip(如:127.0.0.1)和多個域名(虛擬主機(jī))的綁定
- apache虛擬主機(jī)的配置指南
- apache中使用mod_gnutls模塊實(shí)現(xiàn)多個SSL站點(diǎn)配置(多個HTTPS協(xié)議的虛擬主機(jī))
- apache配置虛擬主機(jī)的方法詳解
- 13個實(shí)用的Apache Rewrite重寫規(guī)則
- Apache偽靜態(tài)Rewrite詳解
- Apache Rewrite實(shí)現(xiàn)URL的301跳轉(zhuǎn)和域名跳轉(zhuǎn)
- Apache Rewrite url重定向功能的簡單配置
- 用ISAPI_Rewrite讓IIS也支持如Apache下.htaccess的URL重寫
- Apache中Virtual Host虛擬主機(jī)配置及rewrite參數(shù)說明
相關(guān)文章
CentOS服務(wù)器下安裝Webmin管理系統(tǒng)的步驟
如果你想像windows圖形化管理系統(tǒng),Webmin無疑是最好的選擇。2011-03-03
centos7.2搭建nginx的web服務(wù)器部署uniapp項(xiàng)目
這篇文章主要介紹了centos7.2搭建nginx的web服務(wù)器部署uniapp項(xiàng)目,本文給大家介紹的非常詳細(xì),具有一定的參考借鑒價值,需要的朋友可以參考下2019-10-10
Linux設(shè)置Service服務(wù)開機(jī)自啟的教程指南
在 Linux 系統(tǒng)中,確保關(guān)鍵服務(wù)能夠在系統(tǒng)啟動時自動運(yùn)行是一項(xiàng)非常重要的任務(wù),尤其是在服務(wù)器環(huán)境中,我們希望一些服務(wù)能夠在系統(tǒng)每次啟動后自動啟動,從而確保業(yè)務(wù)的持續(xù)運(yùn)行,本指南將詳細(xì)介紹如何在Linux系統(tǒng)中設(shè)置Service服務(wù)開機(jī)自啟,需要的朋友可以參考下2024-10-10
Linux內(nèi)核中的設(shè)計(jì)模式之全面理解與示例代碼
這篇文章主要介紹了Linux內(nèi)核中的設(shè)計(jì)模式之全面理解與示例代碼,具有很好的參考價值,希望對大家有所幫助,如有錯誤或未考慮完全的地方,望不吝賜教2024-02-02
詳解Linux環(huán)境下NodeJS的安裝配置(HelloWorld)
本篇文章主要介紹了Linux環(huán)境下NodeJS的安裝配置,小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧2017-01-01

