Apache Server httpd.conf file annotation and configuration guidance recommendation:
YYN Posted Date:
April 29, 2001 Reading:
402
We made a simple note in the HTTPDCONF file. Here, it is just a comment, and it is easy to browse if you want to browse the original text, we also prepared this is httpdconf file zip, and there is an annotation on this page. Friends don't mix the files, I will give it another name PHPSTARHTTPDCONF if you have any questions, please see the fine information: http: // wwwapacheorg / docs /. The following is the details ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ---------------------------------- Before: 1. Configure and write file names: If you give The file name begins with "/", then the server will use absolute directories. 2, if the name given is not "/" start, such as "log / foolog", and the current server is "/ usr / local / apache /", then the server will think here: "/ usr / local / apache / logs / fool" 3, Note: Use the slash "/" in all filenames throughout the configuration, without reverse line "". Such as: Use "C: / Apache" without "c: Apache", here is different from DOS --------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------- - Apache Server configuration instructions are divided into three relative sets of part 1 Configuring Apache Servers Anestal Variables 2 Configuring the primary server or the default server running parameter 3 Set the virtual server, making it in the same Apache A web request for different IP addresses or different hostnames on the server: a physical server can be set to have a number of IP addresses or many hostnames. Part 1: Environment setting # Setting up server Starting mode: Standalone, or by the Internet Servo program inetd. # The default is to use stand-alone boot (STANDALONE). ServerType Standalone # Set the server directory to store the server's configuration file, error file, and record files. # Note: The last cannot be added to the directory "/". ServerRoot "C: / Apache" # The service program starts, which uses the parent's httpd program code Process ID to this # log / httpdpid file. This file name can be combined with the PIDFile instruction to change the pidfile logs / httpdpid # to set the record file for the Apache server executing program. ScoreboardFile logs / apache_status # below these two items to see personal preferences, if you think the httpdconf file is too long, it is not easy to find what you need. # So you can put the desired settings in SRMConf it is only a few lines, then open it below: # below the two settings below, open in the standard configuration, we can not open it # 去 下"#", Enabling SRMCONF #ResourceConfig conf / srmconf #accessConfig conf / srmconf # server and client's maximum wait time # If the client is not connected to the client in 300 seconds, or the server has not transferred data to the client, Automatic disconnection. Timeout 300 # Set whether to support the transmission function is the number of support for KeePalive ON # settings support. The more the number is, the more hard disk space, the better performance. # Set to 0 without limit.
MaxkeepaliveRequests 100 # Set the maximum wait time of the remaining passage # If a user on the connection has not requested a request to the server after 15 seconds, he cannot use the renewal function. KeepaliveTimeout 15 # Sets the number of sub-processes in the same time, in order to be safe, set to zero MaxRequestSperchild 0 # to set the number of servers using the server. # This is based on the server's response speed, and the number is too large. Threadsperchild 50 # Allows access to the server with additional Port or IP address You can open it. #Listen 3000 #Listen 12345678: 80 # Set the IP address of the Apache listener, this is also the IP address of the virtual server on this machine Bindaddress 127001 # Opens the currently unfained predefined modules, unless you really need, don't Change it #LoadModule Anon_Auth_Module Modules / ApachemoduleAuthanondll # Set status information generated by the server. If set to "ON", create a detailed information #extendedstatus on --------------------------------- --------------------------------------------- Second part detailed interface Parameter Setting # Sets the port that the server is listening when using it. Port 80 # sets the host name of the server manager's E-mail address ServerAdmin Siron @ phpstarcom # server. If you have a fixed IP address, you don't need to set the servername localhost # to set the directory Documentroot "C: / Apache / HTDOCS" # set / directory instruction for the storage site HTML file. The specific description is as follows: #boption: Defines the operations that can be performed in the directory. # None Express You can only browse # followsymlinks Allow the page to connect to others, # execcgi Allows the CGI, # MultiViews allows you to watch the animation or listen to music, # indexes Allow the server to return to the list of formatted lists, # includees allows SSI to use SSI . # These settings can be checked. All can do anything, but do not include MultiViews. # A aoverride: # 加 n 参 参 indicates that anyone can browse the files in the directory, but not read the file. # FileInfo Allows the use of instructions of the file type, # authconfig allows usage, # indexes Allows the use of directory instructions, # it allows the use of the host's instructions, # Options Allows control specific directories Featured instructions Using # Set to all, the server will allow all instructions Ptions FollowSymlinks allowoverride none to define the first displayed file.
# You can change DirectoryIndex indexhtml indexhtm directoryindex indexhtml # Define each directory access control file Name AccessFileName HTACCESS # Define Agent Server Do not cache your page Default not to use #cachenegotiatedDocs # This command sets the location of the MIME type configuration file location The # file name is relative to ServerRoot, not recommended to change this file TypeSconfig conf / mimeTypes # server records the error message to a record file, # file name can be set by ERRORLOG instruction # can be set for different virtual hosts Different error record errorlog logs / errorlog # Setup file format logformat "% H% L% u% T"% R "%> S% B" CommON # alias instruction allows files to be stored outside DocumentRoot File system # Scriptalias directive is the same as the Alias directive, but it also marks the file name containing the CGI or PHP instruction file # addtype instructions to the file name ended as the file name ends the file name Alias / ICONS / "C : / Apache / Icons / "Alias / Test /" C: / PHP / TEST / "Alias / Admin /" c: / admin / phpMyadmin / "Scriptalias / PHP /" C: / PHP / "AddType Application / X-httpd -PHP php address / x-httpd-php3 php3 action application / x-httpd-php "/ php / phpexe" # addicon, addiconbyencoding and addiconbyte # is used to set a list of icons used by different files For each column # out of the file, display the first elevational illustration of the listed. AddiconBytype Vid, / ICons / Moviegif Video / Addicon / Icons / BinaryGif BIN EXE # Default file icon DEFAULTICON / ICONS / UnknownGIF # If there is a problem or error, you can configure the Apache to do four reaction # 1 output custom Customized message text #errordocument 500 "The Server Made A Boo Boo # 2 Re-directed to a local URL to handle this problem / error #errordocument 404 / misstml #errordocument 404 / cgi-bin / missing_handlerpl # 3 to be rectified to a the external URL to handle the problem / error #ErrorDocument 402 http: // someother_servercom / subscription_infohtml author: Siron source: China PHP Alliance