Wednesday, January 26, 2011

Apache Server's httpd.conf file comments and configuration guide

We put httpdconf file is a simple note, here's just one comment had to ask, easy to browse if you want to contrast the original browser, we have prepared for you here is a zip file, this httpdconf page comments inside has to friends so confused the file, I'll give it another life a phpstarhttpdcon if you have any questions, please see wants information: http://wwwapacheorg/docs/.

The following is a detailed content--------------------------------------------------------------------------------before you start: 1, configuration, and write the file name is "Note: If you give a file name beginning with"/", then the server will use absolute directory. 2. If the given file name does not begin with "/", such as: "logs/foolog", and the current server directory is "/usr/local/apace/", then the server assumes that the log file here: "/usr/local/apache/logs/foolog" 3, attention: throughout the configuration process all the file names must use the slash "/", instead of the backslash "". Such as: "c:/apache" instead of "c:apache", here is not the same as with DOS--------------------------------------------------------------------------------an Apache server configuration directives don't split into three relatively centralized part 1 configure Apache server running all the environment variables to configure the primary server or 2 default server run-time details of the interface parameter 3 set virtual server, on the same Apache Server, it can complete a different IP address or host name of the Web requests that a single physical server can be set to a large number of IP addresses or host names in the first part of the virtual server: environment set # set server startup: independent startup (standalone) or by the Internet Server program to start inetd. # The default is to use independent startup (standalone). ServerTypestandalone # set server directory, to hold the server's configuration files, error file, the log file directory. # Note: the last of the directory can not be combined with the slash "/". ServerRoot "C:/Apace" # service starts, it put the parent program httpd code processid as to this # log/httpdpid file. This file name can be changed with PidFile directive PidFilelogs/httpdpid # set Apache Server execution log files. ScoreBoardFilelogs/apache_status # following both at the individual's preferences, if you think httpdconf file is too long, not found. # Then you can set the required settings on it only few srmconf rows, and then open it in the following: # the following two settings, in the standard configuration is turned on, we can not open it # remove the next line of "#" in front, enabling srmcon # ResourceConfigconf/srmcon # AccessConfigconf/accesscon # server and the client's maximum wait time # if client in 300 seconds is not connected, or the server 300 seconds is not transfer data to the client, it will automatically be disconnected. Timeout300 # set whether to support resume function default is set to support KeepAliveOn # support the resume functionality. The more the number of wasted hard disk space, the more the better the performance. # Set to 0 then there is no limit. MaxKeepAliveRequests100 # settings keep resume maximum wait time # if connection to a consumer in 15 seconds has not issued a request to the server, then he cannot use the resume functionality. KeepAliveTimeout15 # settings for the same period the number of child processes, to security, setting to zero MaxRequestsPerChild0 # set up the server with the number of the process. # This is the server's responsiveness to prevail, is too big it will slow ThreadsPerChild50 # allows you to use a different Port or IP address of the access server, you can open it. # Listen3000 # Listen12345678: 80 # set Apache to listen on the IP address, which is your native on the virtual server's IP address BindAddress127001 # open the current inactive predefined modules, here unless you really need, do not change it # LoadModuleanon_auth_modulemodules/ApacheModuleAuthAnondll # sets the server-generated status information. If set to "On", the resulting detailed information # ExtendedStatusOn---------------------------------------------------------------------------------Part 2 detail interface parameters set # set server independent use listening port. Port80 # set up the Server Manager's E-Mail address ServerAdmin siron @ phpstarcom # server host name. If you have a fixed IP address, you do not need to set settings for the storage site ServerNamelocalost # html files directory DocumentRoot ' C:/Apache/htdocs "# set/directory of the directive. Specific instructions are as follows: # Option: defined in the catalog to perform. # None indicates that you can only browse # FollowSymLinks allows pages to connect to another place, # ExecCGI allow execution of CGI, # MultiViews allowed to watch the animation or listening to music, such as to allow the server to return the Indexes # catalog formatted list and # Includes to allow the use of SSI. # You can check these settings. All you can do anything, but does not include the MultiViews. # AllowOverride: # plus None parameter indicates that anyone can browse the directory of the file, but does not read the file. # FileInfo allows you to control how the file type of the directive, # AuthConfig allows inspection of recognition directive, # Indexes allow control directory index of Directive use, # Limit allows you to control access to a host of Directive use, # Options allows you to control a specific Directory features of instruction using a # is set to All, then the server will allow all directives define ptionsFollowSymLinks AllowOverrideNone # displayed first. # You can change the DirectoryIndexindexhtmlindextm DirectoryIndexindextml # define each directory access control file name AccessFileNamehtaccess # define proxy server not to cache your page the default do not use # CacheNegotiatedDocs # this instruction set mime types configuration file is located, # name of the file is relative to the ServerRoot, does not recommend changing this file TypesConfigconf/mimetypes # Server error messages are logged to a log file, the file name can take # by ErrorLog directives set # for different virtual hosts set up different error records ErrorLoglogs/errorlog # set record stalls format LogFormat "% h% l% u% t"% r "% > s% b" Alias directive allows common # files outside the DocumentRoot can be stored in the local file system # ScriptAlias directives with the same Alias directive, except that it also marks changed directory contains CGI or PHP directive file # AddType directive to specify the type of content as the file name ends with the file name of the file's Deputy Alias/icons/' C:/Apache/icons/"Alias/test/' c:/php/test/" Alias/admin/' c:/admin/phpMyAdmin/"ScriptAlias/php/' c:/pp/" AddTypeapplication/x-httpd-phppp AddTypeapplication/x-httpd-php3pp3 Actionapplication/x-httpd-php "/php/phpexe" # AddIcon, AddIconByEncodingandAddIconByType are # is used to set the display different file types by using a list of illustrations; about each column # out file, display a list of the first meet of the diagram. AddIconByTypeVID,/icons/moviegifvideo/AddIcon/icons/binarygifbinexe # default file photo shows the DefaultIcon/icons/unknowngi # have a problem or an error occurs, you can configure Apache to do four response # 1 output custom customized message text # ErrorDocument500 "Theservermadeabooboo # 2 to import to a local URL to handle the problem/error # ErrorDocument404/missingtml # ErrorDocument404/cgi-bin/missing_handlerpl # 3 rerouting to an external URL to handle the problem/error # ErrorDocument402http://someother_servercom/subscription_infohtml

No comments:

Post a Comment