花生壳的顶级域名增加了二级域名 Apache花生壳如何设置
时间:2008-01-16
来源:互联网
复制内容到剪贴板
我的顶级域名是www.abc.com,我在花生壳里增加了二级域名 blog.abc.com
我的服务器是Apache的!
问题是如何在Apache里设置?花生壳又要怎样设置同时指向blog.abc.com和 www.abc.com 我的ip是固定的
以下是我的Apache httpd.conf
代码:
具体的说:我的顶级域名是www.abc.com,我在花生壳里增加了二级域名 blog.abc.com
我的服务器是Apache的!
问题是如何在Apache里设置?花生壳又要怎样设置同时指向blog.abc.com和 www.abc.com 我的ip是固定的
复制内容到剪贴板
#
# 基于 NCSA server 配置文件
#
### Section 1: Global Environment
# ServerType 定义为 inetd 或 standalone 之一,Inetd 模式只用于 Unix 平台
ServerType standalone
# 主机路径
ServerRoot "D:/usr/local/apache"
# PidFile 路径
PidFile logs/httpd.pid
#
# ScoreBoardFile: File used to store internal server process information.
# Not all architectures require this. But if yours does (you'll know because
# this file will be created when you run Apache) then you *must* ensure that
# no two invocations of Apache share the same scoreboard file.
#
ScoreBoardFile logs/apache_runtime_status
#
# In the standard configuration, the server will process httpd.conf (this
# file, specified by the -f command line option), srm.conf, and access.conf
# in that order. The latter two files are now distributed empty, as it is
# recommended that all directives be kept in a single file for simplicity.
# The commented-out values below are the built-in defaults. You can have the
# server ignore these files altogether by using "/dev/null" (for Unix) or
# "nul" (for Win32) for the arguments to the directives.
#
#ResourceConfig nul
#AccessConfig nul
# 超时(秒)
Timeout 300
# 持久连接
KeepAlive On
# 最大持久连接请求
MaxKeepAliveRequests 100
# 持久连接超时(秒)
KeepAliveTimeout 15
# 每个子进程最大请求(0=无限)
MaxRequestsPerChild 0
# 每个子进程线程
ThreadsPerChild 50
# 监听
#Listen 80
#Listen localhost:80
#
# 限制地址
#BindAddress *
# 注意:模块加载顺序很重要,在没有专家建议的情况下不要随便改动。
#LoadModule vhost_alias_module modules/mod_vhost_alias.so
#LoadModule mime_magic_module modules/mod_mime_magic.so
#LoadModule status_module modules/mod_status.so
#LoadModule info_module modules/mod_info.so
#LoadModule speling_module modules/mod_speling.so
#LoadModule rewrite_module modules/mod_rewrite.so
#LoadModule anon_auth_module modules/mod_auth_anon.so
#LoadModule dbm_auth_module modules/mod_auth_dbm.so
#LoadModule digest_auth_module modules/mod_auth_digest.so
#LoadModule digest_module modules/mod_digest.so
#LoadModule proxy_module modules/mod_proxy.so
#LoadModule cern_meta_module modules/mod_cern_meta.so
#LoadModule expires_module modules/mod_expires.so
#LoadModule headers_module modules/mod_headers.so
#LoadModule usertrack_module modules/mod_usertrack.so
#LoadModule unique_id_module modules/mod_unique_id.so
# [无论你上面改变了什么模块,在这里做同样改变!]
ClearModuleList
#AddModule mod_vhost_alias.c
AddModule mod_env.c
AddModule mod_log_config.c
#AddModule mod_mime_magic.c
AddModule mod_mime.c
AddModule mod_negotiation.c
#AddModule mod_status.c
#AddModule mod_info.c
AddModule mod_include.c
AddModule mod_autoindex.c
AddModule mod_dir.c
AddModule mod_isapi.c
AddModule mod_cgi.c
AddModule mod_asis.c
AddModule mod_imap.c
AddModule mod_actions.c
#AddModule mod_speling.c
AddModule mod_userdir.c
AddModule mod_alias.c
#AddModule mod_rewrite.c
AddModule mod_access.c
AddModule mod_auth.c
#AddModule mod_auth_anon.c
#AddModule mod_auth_dbm.c
#AddModule mod_auth_digest.c
#AddModule mod_digest.c
#AddModule mod_proxy.c
#AddModule mod_cern_meta.c
#AddModule mod_expires.c
#AddModule mod_headers.c
#AddModule mod_usertrack.c
#AddModule mod_unique_id.c
AddModule mod_so.c
AddModule mod_setenvif.c
# 扩展情况
#ExtendedStatus On
### 部分 2: 主机配置
# 端口
Port 80
# 主机管理员信箱
ServerAdmin [email protected]
# 主机名
ServerName abc.com
# 文档路径
DocumentRoot "D:/usr/www/html"
# 绝对限制许可
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
# 文档路径权限设置
<Directory "D:/usr/www/html">
Options FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
# 用户路径
<IfModule mod_userdir.c>
UserDir "D:/usr/local/apache/users/"
</IfModule>
#
# Control access to UserDir directories. The following is an example
# for a site where these directories are restricted to read-only.
#
#<Directory "D:/usr/local/apache/users">
# AllowOverride FileInfo AuthConfig Limit
# Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
# <Limit GET POST OPTIONS PROPFIND>
# Order allow,deny
# Allow from all
# </Limit>
# <LimitExcept GET POST OPTIONS PROPFIND>
# Order deny,allow
# Deny from all
# </LimitExcept>
#</Directory>
# 索引文件
<IfModule mod_dir.c>
DirectoryIndex index.html index.htm index.php
</IfModule>
# 访问控制文件名
AccessFileName access.ht
# 防止访问控制文件被访问者察看
<Files ~ "^\access.ht">
Order allow,deny
Deny from all
Satisfy All
</Files>
# 缓存协议
#CacheNegotiatedDocs
# 使用规范名称
UseCanonicalName On
# 类型设置
<IfModule mod_mime.c>
TypesConfig conf/mime.types
</IfModule>
# 默认协议
DefaultType text/plain
# 魔术设置
<IfModule mod_mime_magic.c>
MIMEMagicFile conf/magic
</IfModule>
# 主机名查找
HostnameLookups Off
# 错误记录
ErrorLog logs/error.log
# 记录等级,包括:debug, info, notice, warn, error, crit, alert, emerg.
LogLevel error
# 记录格式
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
# 访问记录
CustomLog logs/access.log common
#
# If you would like to have agent and referer logfiles, uncomment the
# following directives.
#
#CustomLog logs/referer.log referer
#CustomLog logs/agent.log agent
#
# If you prefer a single logfile with access, agent, and referer information
# (Combined Logfile Format) you can use the following directive.
#
#CustomLog logs/access.log combined
# 服务器签名
# 选择一个: On | Off | EMail
ServerSignature On
# PHP [模块方式运行]
LoadModule php4_module D:/usr/local/php/php4apache.dll
# PHP [CGI 方式运行]
#ScriptAlias /php/ "D:/usr/local/php/"
#Action application/x-httpd-php "/php/php.exe"
AddType application/x-httpd-php .php
# CGI 脚本解释路径
#!D:/usr/bin/perl
# 别名开始
<IfModule mod_alias.c>
Alias /icons/ "D:/usr/local/apache/icons/"
<Directory "D:/usr/local/apache/icons">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
# 脚本路径别名
ScriptAlias /cgi-bin/ "D:/usr/www/cgi-bin/"
<Directory "D:/usr/www/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
</IfModule>
# 别名结束
# 自动索引目录下所有文件
<IfModule mod_autoindex.c>
IndexOptions FancyIndexing
AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*
AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core
AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^
DefaultIcon /icons/unknown.gif
# Readme 文件名及 Header 文件名
ReadmeName README.txt
HeaderName HEADER.txt
IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
</IfModule>
# 结束自动索引
# 文档类型
<IfModule mod_mime.c>
AddType application/x-tar .tgz
AddEncoding x-compress .Z
AddEncoding x-gzip .gz .tgz
# 语言
AddLanguage da .dk
AddLanguage nl .nl
AddLanguage en .en
AddLanguage et .ee
AddLanguage fr .fr
AddLanguage de .de
AddLanguage el .el
AddLanguage he .he
AddCharset ISO-8859-8 .iso8859-8
AddLanguage it .it
AddLanguage ja .ja
AddCharset ISO-2022-JP .jis
AddLanguage kr .kr
AddCharset ISO-2022-KR .iso-kr
AddLanguage nn .nn
AddLanguage no .no
AddLanguage pl .po
AddCharset ISO-8859-2 .iso-pl
AddLanguage pt .pt
AddLanguage pt-br .pt-br
AddLanguage ltz .lu
AddLanguage ca .ca
AddLanguage es .es
AddLanguage sv .sv
AddLanguage cs .cz .cs
AddLanguage ru .ru
AddLanguage zh-CN .zh-cn
AddLanguage zh-TW .zh-tw
AddCharset GB2312 .Gb2312 .gb
AddCharset Big5 .Big5 .big5
AddCharset WINDOWS-1251 .cp-1251
AddCharset CP866 .cp866
AddCharset ISO-8859-5 .iso-ru
AddCharset KOI8-R .koi8-r
AddCharset UCS-2 .ucs2
AddCharset UCS-4 .ucs4
AddCharset UTF-8 .utf8
# 语言优先顺序
<IfModule mod_negotiation.c>
LanguagePriority cn en da nl et fr de el it ja kr no pl pt pt-br ru ltz ca es sv tw
</IfModule>
# 允许执行的CGI扩展名
AddHandler cgi-script .cgi .pl
# To use server-parsed HTML files
#
#AddType text/html .shtml
#AddHandler server-parsed .shtml
#
# Uncomment the following line to enable Apache's send-asis HTTP file
# feature
#
#AddHandler send-as-is asis
#
# If you wish to use server-parsed imagemap files, use
#
#AddHandler imap-file map
#
# To enable type maps, you might want to use
#
#AddHandler type-map var
</IfModule>
# 文档类型结束
#
# Action lets you define media types that will execute a script whenever
# a matching file is called. This eliminates the need for repeated URL
# pathnames for oft-used CGI file processors.
# Format: Action media/type /cgi-script/location
# Format: Action handler-name /cgi-script/location
#
#
# MetaDir: specifies the name of the directory in which Apache can find
# meta information files. These files contain additional HTTP headers
# to include when sending the document
#
#MetaDir .web
#
# MetaSuffix: specifies the file name suffix for the file containing the
# meta information.
#
#MetaSuffix .meta
#
# Customizable error response (Apache style)
# these come in three flavors
#
# 1) plain text
#ErrorDocument 500 "The server made a boo boo.
# n.b. the single leading (") marks it as text, it does not get output
#
# 2) local redirects
#ErrorDocument 404 /missing.html
# to redirect to local URL /missing.html
#ErrorDocument 404 /cgi-bin/missing_handler.pl
# N.B.: You can redirect to a script or a document using server-side-includes.
#
# 3) external redirects
#ErrorDocument 402 http://www.example.com/subscription_info.html
# N.B.: Many of the environment variables associated with the original
# request will *not* be available to such a script.
# 定制浏览器特征
<IfModule mod_setenvif.c>
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0
</IfModule>
# 定制浏览器特征结束
#
# Allow server status reports, with the URL of http://servername/server-status
# Change the "localhost" to match your domain to enable.
#
#<Location /server-status>
# SetHandler server-status
# Order deny,allow
# Deny from all
# Allow from localhost
#</Location>
#
# Allow remote server configuration reports, with the URL of
# http://servername/server-info (requires that mod_info.c be loaded).
# Change the "localhost" to match your domain to enable.
#
#<Location /server-info>
# SetHandler server-info
# Order deny,allow
# Deny from all
# Allow from localhost
#</Location>
#
# There have been reports of people trying to abuse an old bug from pre-1.1
# days. This bug involved a CGI script distributed as a part of Apache.
# By uncommenting these lines you can redirect these attacks to a logging
# script on phf.apache.org. Or, you can record them yourself, using the script
# support/phf_abuse_log.cgi.
#
#<Location /cgi-bin/phf*>
# Deny from all
# ErrorDocument 403 http://phf.apache.org/phf_abuse_log.cgi
#</Location>
### 部分 3: 虚拟主机
# 基于名称的虚拟主机示例:
#<VirtualHost *>
#ServerAdmin [email protected]
#DocumentRoot D:\usr\www\html\supeite
#ServerName abc.com
#ServerAlias supeite.abc.com
#DirectoryIndex index.html index.htm index.php
#</VirtualHost>
#<VirtualHost *>
#ServerAdmin [email protected]
#DocumentRoot D:\usr\www\html
#ServerName abc.com
#ServerAlias forum.abc.com
#DirectoryIndex index.html index.htm index.php
#</VirtualHost>
代码:
#
# 基于 NCSA server 配置文件
#
### Section 1: Global Environment
# ServerType 定义为 inetd 或 standalone 之一,Inetd 模式只用于 Unix 平台
ServerType standalone
# 主机路径
ServerRoot "D:/usr/local/apache"
# PidFile 路径
PidFile logs/httpd.pid
#
# ScoreBoardFile: File used to store internal server process information.
# Not all architectures require this. But if yours does (you'll know because
# this file will be created when you run Apache) then you *must* ensure that
# no two invocations of Apache share the same scoreboard file.
#
ScoreBoardFile logs/apache_runtime_status
#
# In the standard configuration, the server will process httpd.conf (this
# file, specified by the -f command line option), srm.conf, and access.conf
# in that order. The latter two files are now distributed empty, as it is
# recommended that all directives be kept in a single file for simplicity.
# The commented-out values below are the built-in defaults. You can have the
# server ignore these files altogether by using "/dev/null" (for Unix) or
# "nul" (for Win32) for the arguments to the directives.
#
#ResourceConfig nul
#AccessConfig nul
# 超时(秒)
Timeout 300
# 持久连接
KeepAlive On
# 最大持久连接请求
MaxKeepAliveRequests 100
# 持久连接超时(秒)
KeepAliveTimeout 15
# 每个子进程最大请求(0=无限)
MaxRequestsPerChild 0
# 每个子进程线程
ThreadsPerChild 50
# 监听
#Listen 80
#Listen localhost:80
#
# 限制地址
#BindAddress *
# 注意:模块加载顺序很重要,在没有专家建议的情况下不要随便改动。
#LoadModule vhost_alias_module modules/mod_vhost_alias.so
#LoadModule mime_magic_module modules/mod_mime_magic.so
#LoadModule status_module modules/mod_status.so
#LoadModule info_module modules/mod_info.so
#LoadModule speling_module modules/mod_speling.so
#LoadModule rewrite_module modules/mod_rewrite.so
#LoadModule anon_auth_module modules/mod_auth_anon.so
#LoadModule dbm_auth_module modules/mod_auth_dbm.so
#LoadModule digest_auth_module modules/mod_auth_digest.so
#LoadModule digest_module modules/mod_digest.so
#LoadModule proxy_module modules/mod_proxy.so
#LoadModule cern_meta_module modules/mod_cern_meta.so
#LoadModule expires_module modules/mod_expires.so
#LoadModule headers_module modules/mod_headers.so
#LoadModule usertrack_module modules/mod_usertrack.so
#LoadModule unique_id_module modules/mod_unique_id.so
# [无论你上面改变了什么模块,在这里做同样改变!]
ClearModuleList
#AddModule mod_vhost_alias.c
AddModule mod_env.c
AddModule mod_log_config.c
#AddModule mod_mime_magic.c
AddModule mod_mime.c
AddModule mod_negotiation.c
#AddModule mod_status.c
#AddModule mod_info.c
AddModule mod_include.c
AddModule mod_autoindex.c
AddModule mod_dir.c
AddModule mod_isapi.c
AddModule mod_cgi.c
AddModule mod_asis.c
AddModule mod_imap.c
AddModule mod_actions.c
#AddModule mod_speling.c
AddModule mod_userdir.c
AddModule mod_alias.c
#AddModule mod_rewrite.c
AddModule mod_access.c
AddModule mod_auth.c
#AddModule mod_auth_anon.c
#AddModule mod_auth_dbm.c
#AddModule mod_auth_digest.c
#AddModule mod_digest.c
#AddModule mod_proxy.c
#AddModule mod_cern_meta.c
#AddModule mod_expires.c
#AddModule mod_headers.c
#AddModule mod_usertrack.c
#AddModule mod_unique_id.c
AddModule mod_so.c
AddModule mod_setenvif.c
# 扩展情况
#ExtendedStatus On
### 部分 2: 主机配置
# 端口
Port 80
# 主机管理员信箱
ServerAdmin [email protected]
# 主机名
ServerName abc.com
# 文档路径
DocumentRoot "D:/usr/www/html"
# 绝对限制许可
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
# 文档路径权限设置
<Directory "D:/usr/www/html">
Options FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
# 用户路径
<IfModule mod_userdir.c>
UserDir "D:/usr/local/apache/users/"
</IfModule>
#
# Control access to UserDir directories. The following is an example
# for a site where these directories are restricted to read-only.
#
#<Directory "D:/usr/local/apache/users">
# AllowOverride FileInfo AuthConfig Limit
# Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
# <Limit GET POST OPTIONS PROPFIND>
# Order allow,deny
# Allow from all
# </Limit>
# <LimitExcept GET POST OPTIONS PROPFIND>
# Order deny,allow
# Deny from all
# </LimitExcept>
#</Directory>
# 索引文件
<IfModule mod_dir.c>
DirectoryIndex index.html index.htm index.php
</IfModule>
# 访问控制文件名
AccessFileName access.ht
# 防止访问控制文件被访问者察看
<Files ~ "^\access.ht">
Order allow,deny
Deny from all
Satisfy All
</Files>
# 缓存协议
#CacheNegotiatedDocs
# 使用规范名称
UseCanonicalName On
# 类型设置
<IfModule mod_mime.c>
TypesConfig conf/mime.types
</IfModule>
# 默认协议
DefaultType text/plain
# 魔术设置
<IfModule mod_mime_magic.c>
MIMEMagicFile conf/magic
</IfModule>
# 主机名查找
HostnameLookups Off
# 错误记录
ErrorLog logs/error.log
# 记录等级,包括:debug, info, notice, warn, error, crit, alert, emerg.
LogLevel error
# 记录格式
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
# 访问记录
CustomLog logs/access.log common
#
# If you would like to have agent and referer logfiles, uncomment the
# following directives.
#
#CustomLog logs/referer.log referer
#CustomLog logs/agent.log agent
#
# If you prefer a single logfile with access, agent, and referer information
# (Combined Logfile Format) you can use the following directive.
#
#CustomLog logs/access.log combined
# 服务器签名
# 选择一个: On | Off | EMail
ServerSignature On
# PHP [模块方式运行]
LoadModule php4_module D:/usr/local/php/php4apache.dll
# PHP [CGI 方式运行]
#ScriptAlias /php/ "D:/usr/local/php/"
#Action application/x-httpd-php "/php/php.exe"
AddType application/x-httpd-php .php
# CGI 脚本解释路径
#!D:/usr/bin/perl
# 别名开始
<IfModule mod_alias.c>
Alias /icons/ "D:/usr/local/apache/icons/"
<Directory "D:/usr/local/apache/icons">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
# 脚本路径别名
ScriptAlias /cgi-bin/ "D:/usr/www/cgi-bin/"
<Directory "D:/usr/www/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
</IfModule>
# 别名结束
# 自动索引目录下所有文件
<IfModule mod_autoindex.c>
IndexOptions FancyIndexing
AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*
AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core
AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^
DefaultIcon /icons/unknown.gif
# Readme 文件名及 Header 文件名
ReadmeName README.txt
HeaderName HEADER.txt
IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
</IfModule>
# 结束自动索引
# 文档类型
<IfModule mod_mime.c>
AddType application/x-tar .tgz
AddEncoding x-compress .Z
AddEncoding x-gzip .gz .tgz
# 语言
AddLanguage da .dk
AddLanguage nl .nl
AddLanguage en .en
AddLanguage et .ee
AddLanguage fr .fr
AddLanguage de .de
AddLanguage el .el
AddLanguage he .he
AddCharset ISO-8859-8 .iso8859-8
AddLanguage it .it
AddLanguage ja .ja
AddCharset ISO-2022-JP .jis
AddLanguage kr .kr
AddCharset ISO-2022-KR .iso-kr
AddLanguage nn .nn
AddLanguage no .no
AddLanguage pl .po
AddCharset ISO-8859-2 .iso-pl
AddLanguage pt .pt
AddLanguage pt-br .pt-br
AddLanguage ltz .lu
AddLanguage ca .ca
AddLanguage es .es
AddLanguage sv .sv
AddLanguage cs .cz .cs
AddLanguage ru .ru
AddLanguage zh-CN .zh-cn
AddLanguage zh-TW .zh-tw
AddCharset GB2312 .Gb2312 .gb
AddCharset Big5 .Big5 .big5
AddCharset WINDOWS-1251 .cp-1251
AddCharset CP866 .cp866
AddCharset ISO-8859-5 .iso-ru
AddCharset KOI8-R .koi8-r
AddCharset UCS-2 .ucs2
AddCharset UCS-4 .ucs4
AddCharset UTF-8 .utf8
# 语言优先顺序
<IfModule mod_negotiation.c>
LanguagePriority cn en da nl et fr de el it ja kr no pl pt pt-br ru ltz ca es sv tw
</IfModule>
# 允许执行的CGI扩展名
AddHandler cgi-script .cgi .pl
# To use server-parsed HTML files
#
#AddType text/html .shtml
#AddHandler server-parsed .shtml
#
# Uncomment the following line to enable Apache's send-asis HTTP file
# feature
#
#AddHandler send-as-is asis
#
# If you wish to use server-parsed imagemap files, use
#
#AddHandler imap-file map
#
# To enable type maps, you might want to use
#
#AddHandler type-map var
</IfModule>
# 文档类型结束
#
# Action lets you define media types that will execute a script whenever
# a matching file is called. This eliminates the need for repeated URL
# pathnames for oft-used CGI file processors.
# Format: Action media/type /cgi-script/location
# Format: Action handler-name /cgi-script/location
#
#
# MetaDir: specifies the name of the directory in which Apache can find
# meta information files. These files contain additional HTTP headers
# to include when sending the document
#
#MetaDir .web
#
# MetaSuffix: specifies the file name suffix for the file containing the
# meta information.
#
#MetaSuffix .meta
#
# Customizable error response (Apache style)
# these come in three flavors
#
# 1) plain text
#ErrorDocument 500 "The server made a boo boo.
# n.b. the single leading (") marks it as text, it does not get output
#
# 2) local redirects
#ErrorDocument 404 /missing.html
# to redirect to local URL /missing.html
#ErrorDocument 404 /cgi-bin/missing_handler.pl
# N.B.: You can redirect to a script or a document using server-side-includes.
#
# 3) external redirects
#ErrorDocument 402 http://www.example.com/subscription_info.html
# N.B.: Many of the environment variables associated with the original
# request will *not* be available to such a script.
# 定制浏览器特征
<IfModule mod_setenvif.c>
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0
</IfModule>
# 定制浏览器特征结束
#
# Allow server status reports, with the URL of http://servername/server-status
# Change the "localhost" to match your domain to enable.
#
#<Location /server-status>
# SetHandler server-status
# Order deny,allow
# Deny from all
# Allow from localhost
#</Location>
#
# Allow remote server configuration reports, with the URL of
# http://servername/server-info (requires that mod_info.c be loaded).
# Change the "localhost" to match your domain to enable.
#
#<Location /server-info>
# SetHandler server-info
# Order deny,allow
# Deny from all
# Allow from localhost
#</Location>
#
# There have been reports of people trying to abuse an old bug from pre-1.1
# days. This bug involved a CGI script distributed as a part of Apache.
# By uncommenting these lines you can redirect these attacks to a logging
# script on phf.apache.org. Or, you can record them yourself, using the script
# support/phf_abuse_log.cgi.
#
#<Location /cgi-bin/phf*>
# Deny from all
# ErrorDocument 403 http://phf.apache.org/phf_abuse_log.cgi
#</Location>
### 部分 3: 虚拟主机
# 基于名称的虚拟主机示例:
#<VirtualHost *>
#ServerAdmin [email protected]
#DocumentRoot D:\usr\www\html\supeite
#ServerName abc.com
#ServerAlias supeite.abc.com
#DirectoryIndex index.html index.htm index.php
#</VirtualHost>
#<VirtualHost *>
#ServerAdmin [email protected]
#DocumentRoot D:\usr\www\html
#ServerName abc.com
#ServerAlias forum.abc.com
#DirectoryIndex index.html index.htm index.php
#</VirtualHost>
作者: wfrock 发布时间: 2008-01-16
我打开了以下。但是用supeite.abc.com或者forum.abc.com都是指向了DocumentRoot D:\usr\www\html\supeite这里。用www.abc.com也是
#<VirtualHost *>
#ServerAdmin [email protected]
#DocumentRoot D:\usr\www\html\supeite
#ServerName abc.com
#ServerAlias supeite.abc.com
#DirectoryIndex index.html index.htm index.php
#</VirtualHost>
#<VirtualHost *>
#ServerAdmin [email protected]
#DocumentRoot D:\usr\www\html
#ServerName abc.com
#ServerAlias forum.abc.com
#DirectoryIndex index.html index.htm index.php
#</VirtualHost>我是去除了 #的。。。。谢谢大家
引用:
# 基于名称的虚拟主机示例:#<VirtualHost *>
#ServerAdmin [email protected]
#DocumentRoot D:\usr\www\html\supeite
#ServerName abc.com
#ServerAlias supeite.abc.com
#DirectoryIndex index.html index.htm index.php
#</VirtualHost>
#<VirtualHost *>
#ServerAdmin [email protected]
#DocumentRoot D:\usr\www\html
#ServerName abc.com
#ServerAlias forum.abc.com
#DirectoryIndex index.html index.htm index.php
#</VirtualHost>
作者: wfrock 发布时间: 2008-01-16
我的系统是windows2003 Apache 是1.X
作者: wfrock 发布时间: 2008-01-16
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28