成人AV在线无码|婷婷五月激情色,|伊人加勒比二三四区|国产一区激情都市|亚洲AV无码电影|日av韩av无码|天堂在线亚洲Av|无码一区二区影院|成人无码毛片AV|超碰在线看中文字幕

apache基于一個ip的域名配置方法

基于一個ip,一個端口,多個域名配置方法:要先改hosts文件。ServerName bbs.xxx.com #域名DocumentRoot "F:/website/bbs" #該域名對應的目錄地址

基于一個ip,一個端口,多個域名配置方法:

要先改hosts文件。


ServerName bbs.xxx.com #域名
DocumentRoot "F:/website/bbs" #該域名對應的目錄地址
#該節(jié)點是配置權限、默認首頁啊等等東東。
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、修改PhpServerApache2.2confextrahttpd-vhosts.conf
直接將上面一段copy到httpd-vhosts.conf的最后即可。
實際上看名字就知道httpd-vhosts.conf是一個虛擬站點配置集中地,方便管理。
也就是如下:

#
# 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" #該域名對應的目錄地址
#該節(jié)點是配置權限、默認首頁啊等等東東。
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
==============================================================================================
linux下配置
Listen 80

NameVirtualHost 61.139.72.10



DocumentRoo

標簽: