apache虛擬主機配置一例
更新時間:2013年02月09日 20:20:35 作者:
apache虛擬主機配置一例,有需要的朋友可以參考下
復(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虛擬主機三種配置方式小結(jié)
- 在Apache服務(wù)器上添加虛擬主機功能的方法
- 給Apache虛擬主機增加端口的方法
- apache服務(wù)器一個ip(如:127.0.0.1)和多個域名(虛擬主機)的綁定
- apache虛擬主機的配置指南
- apache中使用mod_gnutls模塊實現(xiàn)多個SSL站點配置(多個HTTPS協(xié)議的虛擬主機)
- apache配置虛擬主機的方法詳解
- 13個實用的Apache Rewrite重寫規(guī)則
- Apache偽靜態(tài)Rewrite詳解
- Apache Rewrite實現(xiàn)URL的301跳轉(zhuǎn)和域名跳轉(zhuǎn)
- Apache Rewrite url重定向功能的簡單配置
- 用ISAPI_Rewrite讓IIS也支持如Apache下.htaccess的URL重寫
- Apache中Virtual Host虛擬主機配置及rewrite參數(shù)說明
相關(guān)文章
Ubuntu修改密碼及密碼復(fù)雜度策略設(shè)置方法
這篇文章主要介紹了Ubuntu修改密碼及密碼復(fù)雜度策略設(shè)置,方法,本文給大家介紹的非常詳細,對大家的學(xué)習或工作具有一定的參考借鑒價值,需要的朋友可以參考下2020-08-08