About Apache configuration files httpd.conf to three _php tutorials

Source: Internet
Author: User
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. 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 AddIco N/icons/uuencoded.gif. UU addicon/icons/script.gif. conf. Sh. Shar. csh. Ksh. tcl Addicon/icons/tex.gif. Tex addicon/i Cons/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 #AddDescription "gzip compressed document". GZ #AddDescription "tar archive". Tar #AddDescription "gzip compres Sed tar archive ". tgz readmename README headername HEADER indexignore.?? * *~ *# header* readme* RCS CVS *,v *,t when an HTTP request URL is a directory, the server returns the index file in this directory. However, if the default index file does not exist in a directory, and the server is licensed to display a list of directory files, the list of files in this directory is displayed, so that the list of files can be understandable, not just a simple list, which requires the preceding setup parameters. If you use the indexoptions fancyindexing option, you can have the server produce a list of directories that reference various icons for different types of documents. Which type of file is used, the following addiconbyencoding, Addiconbytype, and AddIcon are used to determine which icon to use, based on the MIME encoding, type, and suffix of the file.   If you are unsure of the icon used by the document, use the default icon defined by DefaultIcon. Similarly, you can use Adddescription to add different descriptions to different types of documents. Also, the server is in the directory, querying files defined with Readmename and headername (automatically added.   HTML suffixes, if not found, and then using the. txt suffix to search), if these files are found, the contents of these files are displayed first before the list of files so that the general directory list is more comprehensible. Indexignore let the server ignore the corresponding file when listing the file list, where the file name is defined using mode configuration. AddEncoding x-compress Z addencoding x-gzip gz addencoding is used to tell some MIME types that use compression, which allows the browser to decompress. AddLanguage en addlanguage fr addlanguage de addlanguage da da addlanguage el el AddLanguage it. It languagepriority en fr de an HTML document can have versions of multiple languages at the same time, for example, file1.html documents can have different versions of File1.html.en, file1.html.fr, and so on, each language suffix must Use AddLanguage to define. This allows the server to send different language versions for customers in different countries by negotiating with the browser. Instead, languagepriority defines the priority of different languages in order to respond to requests for file1.html in a different language, in sequence, when the browser does not have special requirements. This internationalization of the ability of practical application is not many. #AddType application/x-httpd-php. phtml #AddType application/x-httpd-php-source. Phps AddType parameter You can specify a MIME type for a file of a specific suffix.   The settings here will overwrite the settings in the Mime.types. #AddHandler cgi-script. CGI AddHandler is used to specify a non-static processing type that defines the document as a non-static document type, needs to be processed, and returns processing results to the browser. For example, the setting in the comments above is to set the file ending in. cgi to the Cgi-script type, and the server will start the CGI program for processing.   If you need to execute a CGI program outside of the path defined in the previous aliasscript, you need to use this parameter to set it, and then the file ending in. CGI will be executed as a CGI program. CGI programs must be allowed in the configuration file, the. htaccess in this directory, and in the. htaccess of its parent directory, which needs to be set by the options execcgi parameter. #AddType text/html. shtml #AddHandler server-parsed. shtml Another type of dynamic processing is server-parsed, which is pre-parsed by the server itself in the markup in the Web page. Change the tag to the correct HTML identity.   Because server-parsed needs to process documents of type text/html, the corresponding. sHTML is defined first as the text/html type. However, to support SSI, you must first use the options includes in the configuration file (or. htaccess) to allow documents in this directory to be of SSI type, or to use the options includesnoexecAllows the normal SSI flag to be executed, but does not execute the external program referenced therein. Another way to specify the server-parsed type is to use the Xbitback setting option, and if Xbithack is set to ON, the server checks all documents of the text/html type (including the. html suffix document), and if the file attributes are found to have the execute bit "x", The server thinks it is a server analysis document and needs to be processed by the server. It is recommended to use AddHandler for setting and Xbitback to off, because using Xbitback will perform additional checks on all HTML documents, reducing efficiency. #AddHandler Send-as-is ASIS #AddHandler imap-file map #AddHandler type-map var above commented AddHandler is used to support Apache server ASIS, Map and var processing capabilities. # Action Media/type/cgi-script/location # Action Handler-name/cgi-script/location because of the limited processing capabilities available within Apache, You can therefore use the action to define external programs for the server as a dynamic document type that can be processed, which is the same as a standard CGI program, after data processing of the input, and then outputting the results of different MIME types. For example, to define an operation that performs wri2txt for a special suffix WRI and then returns the result, you can use: Action windows-writer/bin/wri2txt AddHandler windows-writer WRI go further , you can pre-process a MIME type directly using the action definition, which requires the action parameter setting in the first format in the example. This way, the setup eliminates the need for additional AddHandler to link the processing operation to the file suffix, but instead uses the action to process the MIME-type file directly. However, if the document suffix does not have a formal MIME type, you need to define a MIME type first. #MetaDir. The Web #MetaSuffix. Meta Meta information is pre-sent to the customer's browser some data before the document is sent to the customer, so the browser can access the meta information through the head request without actually returning all the document data through get. The server is usually sent to the browser is some standard HTTP header information, if you want to add additional information, you need to use Metadir toDefines the directory where the meta data resides, while Metas Uffix is used to specify the file suffix that contains the meta data. #ErrorDocument "The server made a boo boo. #ErrorDocument 404/missing.html #ErrorDocument 404/cgi-bin/missing_handler.pl #ErrorDocument 402 http://some.other_ Server.com/subscription_info.html If a customer requests a webpage that does not exist, or does not have access, and so on, the server generates an error code and responds to the client's browser with a page that identifies the error. ErrorDocument is used to set what error should be in response to the client browser those content, errordocument the first parameter is the wrong ordinal, the second parameter is the response data, can be simple text, local page, local CGI program, as well as the Web page on the remote host. 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 browsermatch command for specific client programs, set special parameters to ensure compatibility with older browsers, and support new features of new browsers. # # # # SetHandler Server-status # Order Deny,allow # deny from all # allow from. your_domain.com # # # SetHandler Server-info # Order Deny,allow # deny from "All" # Allow from. your_domain.com # # # Deny from all # ErrorDocument 403 Http://phf.apach e.org/phf_abuse_log.cgi for setting accessThe settings for the control are set primarily for directories and files, but you can also access control settings for different URLs, so you don't have to worry about whether Scriptalias, alias, set the path outside of the controlled directory. The statement that controls the URL is the location statement, which provides protection not only to files on the server, to CGI, but also to the special feature URLs that are provided by the server itself to protect files that cannot be found. Http://servername/server-status is used to report the status of the current Apache server, and Http://servername/server-info is used to report the Apache server statistics. The associated setting also has the Extendedstatus parameter, which allows the server to output a more detailed report. # #ProxyRequests on # # # of Order Deny,allow # deny from all # allow from. your_domain.com # #ProxyVia on #CacheRoot "/www/p Roxy "#CacheSize 5 #CacheGcInterval 4 #CacheMaxExpire #CacheLastModifiedFactor 0.1 #CacheDefaultExpire 1 #NoCache a_dom ain.com another_domain.edu joes.garage_sale.com # Apache server itself has the function of proxy, however this requires loading into the Mod_proxy module. This can be judged using the Ifmodule statement, and if there is a mod_proxy module, use proxyrequests to turn on proxy support. The following directory is used to set the access permission settings for the proxy feature, as well as the individual parameter settings used to set the buffering. Virtual host #NameVirtualHost 12.34.56.78:80 #NameVirtualHost 12.34.56.78 # # ServerAdmin webmaster@host.some_domain.com # Documentroot/www/docs/host.some_domain.com # ServerName Host.som

http://www.bkjia.com/PHPjc/531827.html www.bkjia.com true http://www.bkjia.com/PHPjc/531827.html techarticle indexoptions fancyindexing addiconbyencoding (cmp,/icons/compressed.gif) x-compress x-gzip AddIconByType (TXT,/ Icons/text.gif) text/* Addiconbytype (img,/icons/image2.gif) image/* ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.