Wednesday, December 22, 2010

The main apache configuration files (Configuration Guide)

Author: Tang Hai Jing Apache as a network administrator provides a variety of features, including the directory index and Directory aliases, content negotiation, you can configure HTTP error reporting, CGI program SetUID execution, process, resources management, server-side image maps, rewrite the URL, URL spelling and online manual man, etc.

In other words, if you installed successfully on the LinuxServer the Apache configuration, your computer will take effect as of Apache, but transformed into a veritable WebServer, this change is truly exciting. In the Internet era, external Home Publishing has become the image of a company, an important tool, while internal home page has become the primary means of company management. However, in order to implement these features, first of all we ought to become a LinuxServer configuration and powerful WebServer. This chapter provides details about how to configure the Apache server. Hope colleagues to read this article to reach theory practice bumper purposes, in a short time has become an outstanding network administrator. 1.2 required resources required bundle 1.2.1 RedHat6.2 Server installation 1.2.2 the required configuration file/etc/httpd/conf/httpd.conf system comes with, the administrator configures/etc/httpd/conf/access.conf system comes with, does not need to modify the/etc/httpd/conf/srm.conf system comes with, does not need to modify the configuration of/etc/httpd/conf/httpd.con description 1.3: apache master configuration file source file: ServerTypestandalone # define WebServer startup as standalone to enhance its extensive access timely responsiveness ServerRoot "/etc/httpd" # file containing the httpd server specified by the directory LockFile/var/lock/httpd.lock PidFile/var/run/httpd.pid ScoreBoardFile/var/run/httpd.scoreboard Timeout300 # response timeout, in seconds, KeepAliveOn # allows you to establish a persistent connection MaxKeepAliveRequests100 KeepAliveTimeout15 MinSpareServers5 # you want to keep an idle server processes minimum MaxSpareServers20 # you want to keep an idle server processes the maximum StartServers8 # system startup, the number of daemon MaxClients150 # can provide service for maximum client number is greater than its parts is placed into the request queue MaxRequestsPerChild100 LoadModulevhost_alias_modulemodules/mod_vhost_alias.so LoadModuleenv_module modules/mod_env.so LoadModuleconfig_log_module modules/mod_log_config.so LoadModuleagent_log_module modules/mod_log_agent.so LoadModulereferer_log_modulemodules/mod_log_referer.so LoadModulemime_module modules/mod_mime.so LoadModulenegotiation_modulemodules/mod_negotiation.so LoadModulestatus_module modules/mod_status.so LoadModuleinfo_module modules/mod_info.so LoadModuleincludes_module modules/mod_include.so LoadModuleautoindex_module modules/mod_autoindex.so LoadModuledir_module modules/mod_dir.so LoadModulecgi_module modules/mod_cgi.so LoadModuleasis_module modules/mod_asis.so LoadModuleimap_module modules/mod_imap.so LoadModuleaction_module modules/mod_actions.so LoadModuleuserdir_module modules/mod_userdir.so LoadModulEalias_module modules/modules/mod_rewrite.so mod_alias.so LoadModulerewrite_module LoadModuleaccess_module modules/mod_access.so LoadModuleauth_module modules/mod_aut.so LoadModuleanon_auth_module modules/mod_auth_anon.so LoadModuledb_auth_module modules/mod_auth_db.so LoadModuledigest_module modules/mod_digest.so LoadModuleproxy_module modules/libproxy.so LoadModuleexpires_module modules/mod_expires.so LoadModuleheaders_module modules/mod_headers.so LoadModuleusertrack_module modules/mod_usertrack.so LoadModulesetenvif_module modules/mod_setenvi.so LoadModuleperl_module modules/libperl.so LoadModulephp3_module modules/libphp3.so ClearmoduleList AddModulemod_vhost_alias.c AddModulemod_env.c AddModulemod_log_config.c AddModulemod_log_agent.c AddModulemod_log_referer.c AddModulemod_mime.c AddModulemod_negotiation.c AddModulemod_status.c AddModulemod_ino.c AddModulemod_include.c AddModulemod_autoindex.c AddModulemod_dir.c AddModulemod_cgi.c AddModulemod_asis.c AddModulemod_imap.c AddModulemod_actions.c # AddModulemod_speling.c AddModulemod_userdir.c AddModulemod_alias.c AddModulemod_rewrite.c AddModulemod_access.c AddModulemod_aut.c AddModulemod_auth_anon.c AddModulemod_auth_db.c AddModulemod_digest.c AddModulemod_proxy.c AddModulemod_expires.c AddModulemod_headers.c AddModulemod_usertrack.c AddModulemod_so.c AddModulemod_setenvi.c AddModulemod_perl.c AddModulemod_pp3.c Port80 # define server uses TCP port number Usernobody Groupnobody # the above two lines are assigned to new users of httpd file permissions for Security consider their permissions settings the lowest. ServerAdmin & nbsproot@weboa.com.cn # set Web Administrator's e-mail address ServerNameWebOA # define client from the server reads the data back to the client's host name, the default value is localhost, first install Linux often an error here. DocumentRoot "/home/weboa/jakarta-tomcat/webapps/weboa" # set to the root of all Apache document, for example, a user's access request, http://www.weboa.com.cn/index.html Apache on its response is/home/weboa/jakarta-tomcat/webapps/weboa/index.tml OptionsFollowSymLinks AllowOverrideNone OptionsIndexesIncludesFollowSymLinksAllowOverrideNone Orderallow, deny Allowfromall # allow everyone access UserDirpublic_tml DirectoryIndexindex.htmlindex.htmindex.shtmlindex.cgi # set various successful access home page, in order to improve the system fault tolerance AccessFileName.htaccess Orderallow, deny Denyfromall UseCanonicalNameOn TypesConfig/etc/mime.types DefaultTypetext/plain MIMEMagicFileshare/magic HostnameLookupsOf ErrorLog/usr/log/httpd/error_log LogLevelwarn # define those types of errors are logged to the error log LogFormat "% h% l% u% t\"% s "% > r\% b\"% {Referer} i\ "\"% {User-Agent} i\ "" LogFormat combined # all is used to define the log entries in the LogFormat "% h% l% u% r\ t\"% s "% >% b" common LogFormat "% {Referer} I – >% U" referer LogFormat "% {User-agent} I" agent CustomLog/usr/httpd/log/access_logcommon ServerSignatureOn Alias/icons/"/home/httpd/icons/" # define virtual hosts directory and the system directories of the correspondence between OptionsIndexesMultiViews AllowOverrideNone Orderallow, deny Allowfromall ScriptAlias/cgi-bin/"/home/httpd/cgi-bin/" # define CGI directory AllowOverrideNone OptionsExecCGI Orderallow, deny Allowfromall IndexOptionsFancyIndexing AddIconByEncoding (CMP,/icons/compressed.gif) x-compressx-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.qx 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.pd AddIcon/icons/text.gif.txt AddIcon/icons/c.gi .c AddIcon/icons/

No comments:

Post a Comment