Switch httpd. conf to APACHE configuration file 3

Source: Internet
Author: User

IndexOptions FancyIndexing plugin (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. in this case. 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/export 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 compressed tar archive ". tgz ReadmeName README HeaderName HEADER IndexIgnore .?? **~ * # HEADER * README * rcs cvs *, v *, t when the URL of an HTTP request 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 permits the display of the directory file list, the list of files in this directory is displayed, to make the file list understandable, not just a simple list, you need the preceding settings parameters. If the IndexOptions FancyIndexing option is used, various icons can be referenced in the directory column table generated by the server for different types of documents. The following AddIconByEncoding, AddIconByType, and AddIcon are used to determine which icons are used based on MIME encoding, type, and file suffix. If you cannot determine the icon used in the document, use the default icon defined by DefaultIcon. Similarly, AddDescription can be used to add different descriptions for different types of documents. In addition, the server is still in the directory to query the files defined by ReadmeName and HeaderName (automatically added. HTML extension, if not found, then use the suffix .txt for search). If these files are found, the contents of these files are first displayed before the file list to make the list of common directories more understandable. IndexIgnore allows the server to ignore the corresponding files when listing the files. The file name is defined in pattern configuration. AddEncoding x-compress Z AddEncoding x-gzip gz AddEncoding is used to tell some MIME types that use compression, so that the browser can perform decompression. AddLanguage en. en AddLanguage fr. fr AddLanguage de. de AddLanguage da. da AddLanguage el. el AddLanguage it. it requires agepriority en fr de a HTML document that can be used in multiple languages at the same time. For example, you can prepare file1.html.en1_file1.html for file1.html documents. different versions such as fr, each language suffix must be defined using AddLanguage. In this way, the server can negotiate with the browser to send different language versions for customers in different countries. The Semantic agepriority defines the priority levels of different languages, so that when the browser does not have special requirements, the requests for file1.html are returned in different languages in sequence. There are not many practical applications of this internationalization capability. # AddType application/x-httpd-php. phtml # AddType application/x-httpd-php-source. the phps AddType parameter can specify the MIME type for a file with a specific suffix. The settings here will overwrite the mime. settings in types. # AddHandler cgi-script. cgi AddHandler is used to specify a non-static processing type. It is used to define a document as a non-static file type and needs to be processed before returning the processing result to the browser. For example, if the setting in the above comment is to set the file ending with. cgi to the cgi-script type, the server will start this CGI program for processing. If you need to execute the CGI program outside the path defined by AliasScript, you need to use this parameter for setting. Then, the file ending with. cgi will be executed as a CGI program. The CGI program must be allowed in the configuration file,. htaccess in this directory, and. htaccess in its parent directory. This must be set through the Options ExecCGI parameter. # AddType text/html. shtml # AddHandler server-parsed. another type of dynamic shtml processing is server-parsed. The server analyzes the tags on the webpage in advance and changes the tags to the correct HTML tags. Because server-parsed needs to process text/html documents, the corresponding .shtml must be of the text/html type. However, to support SSI, you must first in the configuration file (or. in htaccess), the Options using des allows the documents in this directory to be of the SSI type, or use Options using desnoexec to execute a common SSI flag, but do not execute external programs referenced in it. Another way to specify the server-parsed type is to use the XBitBack setting option. If XBitHack is set to On, the server will check all text/HTML documents (documents suffixed with .html ), if the file property has the execution bit "x", the server considers it as a server analysis document and needs to be processed by the server. We recommend that you use AddHandler to set the XBitBack to Off, because XBitBack can be used to perform additional checks on all HTML documents, reducing efficiency. # AddHandler send-as-is asis # AddHandler imap-file map # AddHandler type-map var the annotated AddHandler is used to support the Apache server's asis, map, and var processing capabilities. # Action media/type/cgi-script/location # Action handler-name/cgi-script/location because Apache provides limited processing functions, therefore, Action can be used to define external programs for the server as the type of dynamic documents that can be processed. These external programs are the same as Standard CGI programs and are all processed after the input, then output results of different MIME types. For example, to define an operation that executes wri2txt for the special suffix wri and then returns the result, you can use: Action windows-writer/bin/wri2txt AddHandler windows-writer wri to proceed further, you can directly use Action to define a pre-processing operation for a MIME type. This requires the Action parameter setting method in the first format in the example. In this way, no additional AddHandler is required to associate the processing operation with the file suffix. Instead, Action is used to directly process MIME-type files. However, if the document suffix does not have a formal MIME type, you must first define a MIME type. # MetaDir. web # MetaSuffix. meta Meta information is pre-sent to the customer's browser before the document is sent to the customer. Therefore, the browser can access the Meta information through the HEAD request without actually returning all the document data through GET. The server usually sends some standard HTTP header information to the browser. To add additional information, you need to use MetaDir to define the directory where Meta data is stored, metaS uffix is used to specify the file suffix that contains Meta data. # ErrorDocument 500 "The server made a boo. # ErrorDocument 404/missing.html # ErrorDocument 404/cgi-bin/missing_handler.pl # ErrorDocument 402 http://some.other _ server.com/subscription_info.html if the webpage requested by the customer does not exist, or there is no access permission, etc, the server will generate an error code and respond to a webpage with an incorrect logo in the customer's browser. ErrorDocument is used to set the content in the client browser when an error occurs. The first parameter of ErrorDocument is the error serial number, and the second parameter is the response data, which can be simple text, local Web pages, local CGI programs, and web pages on remote hosts. 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 The BrowserMatch command is a specific client program, set special parameters to ensure compatibility with older browser versions 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 The http://phf.apache.org/phf_abuse_log.cgi is used to set access control settings mainly for directories and files. However, you can also set access control for different URLs, in this way, you don't have to worry about whether ScriptAlias and Alias have set the path out of the controlled directory. The URL-specific control statement is the Location statement, which not only protects files and CGI on the server, but also protects files that cannot be found, it is a special function URL provided by the server itself. Http: // servername/server-status is used to report the status of the current Apache server. http: // servername/server-info is used to report the statistics of the Apache server. The ExtendedStatus parameter is also related to this setting, which allows the server to output more detailed reports. # ProxyRequests On ### Order deny, allow # Deny from all # Allow from. your_domain.com # ProxyVia On # CacheRoot "/www/proxy" # CacheSize 5 # CacheGcInterval 4 # CacheMaxExpire 24 # CacheLastModifiedFactor 0.1 # Route 1 # NoCache a_domain.com route joes. garage_sale.com # the Apache server itself has the proxy function, but this requires loading the mod_proxy module. This can be determined using the IfModule statement. If the mod_proxy module exists, use ProxyRequests to enable Proxy Support. The following Directory is used to set access permissions for the Proxy function and to set parameters for caching. 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

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.