网站运营
位置:首页>> 网站运营>> 详细讲解Apache主配置文件(配置解说)(2)

详细讲解Apache主配置文件(配置解说)(2)

 来源:asp之家 发布时间:2010-05-08 18:31:00 

标签:apache,配置,服务器

Port 80
#定义服务器所使用的TCP的端口号
User nobody
Group nobody
#以上两行是分配给httpd的新用户的文件权限,出于安全的考虑把它们的权限设置成为最低。
ServerAdmin root@weboa.com.cn
#设置Web管理员的邮件地址
ServerName WebOA
#定义客户端从服务器读取数据时返回给客户端的主机名,其缺省值 是localhost,第一次安装Linux的时候经常这里出错。
DocumentRoot "/home/weboa/jakarta-tomcat/webapps/weboa"
#设置所有Apache文档的根目录,比如说,用户对 http://www.weboa.com.cn/index.html的访问
请求,Apache对它的响应是/home/weboa/jakarta-tomcat/webapps/weboa/
index.html
Options FollowSymLinks
AllowOverride None
Options Indexes Includes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all# 允许所有人访问
UserDir public_html
DirectoryIndex index.html index.htm index.shtml index.cgi
#设置多种成功访问主页的方式,为的是提高系统的容错性
AccessFileName .htaccess
Order allow,deny
Deny from all
UseCanonicalName On
TypesConfig /etc/mime.types
DefaultType text/plain
MIMEMagicFile share/magic
HostnameLookups Off
ErrorLog /usr/httpd/log/error_log
LogLevel warn
#定义那些错误类型被记录到错误日志中
LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i"" combined
#所有的LogFormat都用来定义日志中的条目
LogFormat "%h %l %u %t "%r" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog /usr/httpd/log/access_log common
ServerSignature On
Alias /icons/ "/home/httpd/icons/"
#定义虚拟主机目录与系统目录的对应关系
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
ScriptAlias /cgi-bin/ "/home/httpd/cgi-bin/"
#定义CGI目录
AllowOverride None
Options ExecCGI
Order allow,deny
Allow from all
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
ReadmeName README
HeaderName HEADER
AddEncoding x-compress Z
AddEncoding x-gzip gz tgz
AddLanguage en .en
AddLanguage fr .fr
AddLanguage de .de
AddLanguage da .da
AddLanguage el .el
AddLanguage it .it
LanguagePriority en fr de
AddType application/x-httpd-php3 .php3
AddType application/x-httpd-php3-source .phps
AddType application/x-httpd-php .phtml
AddType application/x-tar .tgz
AddType text/html .shtml
AddHandler server-parsed .shtml
AddHandler imap-file map
BrowserMatch "RealPlayer 4.0" force-response-1.0
BrowserMatch "Java/1.0" force-response-1.0
BrowserMatch "JDK/1.0" force-response-1.0
Alias /perl/ /home/httpd/perl/
SetHandler perl-script
PerlHandler Apache::Registry
Options +ExecCGI
Alias /doc/ /usr/doc/
order deny,allow
deny from all
allow from localhost
Options Indexes FollowSymLinks
include /etc/httpd/conf/tomcat-apache.conf
Alias /netcard "/home/weboa/jakarta-tomcat/webapps/weboa/net_card"
Options Indexes FollowSymLinks
allow from all

0
投稿

猜你喜欢

手机版 网站运营 asp之家 www.aspxhome.com