LINUX APACHE Server Configuration Raiders (7)

zhaozj2021-02-11  214

LINUX APACHE Server Configuration Raiders (7)

Author: Bo OSO Oso

If you use the indexOptions FancyIndexing option, you can let the server generated by the server

Table is a variety of icons for a variety of different types of documents. Which file uses which icon, use

The following addiconbyEncoding, addiconbytype, and addicon are defined, which icon is determined based on the encoding, type, and the suffix of the MIME. If you cannot determine the icon used by the document, use the default icon defined by defaulticon.

Similarly, use AddDescription can add different descriptions for different types of documents. and,

The server is still in the directory, queries the files defined using ReadMename and Headername (automatically add.

HTML suffix, if you don't find it, use the .txt suffix for searching), if these files are found,

Just shown on the content of these files before the file list, so that the list of ordinary directories has a greater

Understand.

Indexignore lets the server ignore the corresponding file when listing the file list, where the mode is used

The way the file name is defined.

Addencoding X-Compress Z

Addencoding X-Gzip GZ

Addencoding is used to tell some MIME types that use compressed MIME, which allows the browser to decompress the operation.

Addilaguage en .en

AddLanguage Fr .fr

AddLanguage de .de

AddLanguage da .da

AddLanguage El .l.

AddLanguage It .it

LanguagePriority En fr de

An HTML document can have multiple languages ​​at the same time, such as for file1.html documents

Each language suffix must be defined using addition1.html.en, file1.html.fr. Each language suffix must be defined using AddLanguage. This allows the server to send different language versions by negotiating different countries. LanguagePriority defines the priority of different languages ​​so that when there is no special requirements in the browser, use different language versions to refer to File1.html in order.

This internationalization ability is not much practical.

#Addtype application / x-httpd-php .phtml

#Addtype application / x-httpd-php-source .phps

The AddType parameter can specify the MIME type for a specific suffix, where the settings will override the settings in Mime.Types.

#Addhandler cgi-script .cgi

AddHandler is used to specify non-static processing types for defining documents as a non-static text.

The type of file needs to be processed, and then return to the browser. For example, the setting in the above comment is set to the CGI-Script type with the file ending with .cgi, then the server will start this CGI program for processing. If you need to execute the CGI program outside of the path defined by the previous Aliasscript, you need to use this parameter to set, which will be performed as a CGI program at the end of the .cgi.

In the configuration file, this directory. Htaccess, and its upper-level directory must allow the CGI program, which must be performed through the Options Execcgi parameter setting.

#Addtype text / html .shtml

#Adddhandler server-pased .shtml

Another type of dynamically processed is server-pased, and the server itself analyzes the tag within the web page, and the tag changes to the correct HTML ID. Since Server-Parse needs to process text / html type documents, first define the corresponding .SHTML is the TEXT / HTML type. However, to support SSI, you must first use Options Includes in the configuration file (or .htaccess) to allow the document in this directory to be the SSI type, or use Options IncludesnoExec to make a normal SSI flag, but do not execute the outside of them program.

Another way to specify the server-parse type for use the Xbitback setting option, if the XbitHack is set to ON, the server will check all text / html type documents (including .html suffixed documents), if the file properties are found to be executed X ", the server considers that it is a server analysis document and requires a server to process. It is recommended to use AddHandler to set, and set XbitBack to OFF, because using Xbitback will perform additional checks for all HTML documents, reducing efficiency.

#Addhandler sened-as-is asis

#Addhandler iMap-file map

#Addhandler Type-Map Var

The above annotated AddHandler is used to support ASIS, MAP, and VAR processing capabilities of Apache servers.

.

# Action Media / Type / CGI-Script / Location

# Action Handler-Name / CGI-Script / Location

Because the processing features provided in Apache are limited, you can use ACTION to define external

As the type of dynamic document, these external programs are the same as the standard CGI program, and the results of the different MIME types are output after the input data processing. For example, to define a handleable WRI2TXT to perform WRI2TXT first, then return the result of the result, you can use:

Action Windows-Writer / Bin / WRI2TXT

AddHandler Windows-Writer WRI

Further, you can use the Action definition to perform a pre-processing operation on a MIME type.

Require examples of the Action parameter setting method in the first format. This way setting is no longer needed to use additional addHandler to link the processing operation with the file suffix, but use the Action to process the MIME type file. But if the document suffix does not have a formal MIME type, you need to define a MIME type first.

#Metadir .web

#Metasuffix .meta

META information is pre-sent to the customer browser before the document is sent to the customer, so

The browser can access these META information through the HEAD request without having to return all document data through GET. The server usually sends to the browser is some standard HTTP header information. If you want to increase additional information, you need to use metadir to define the directory of the META data store, and MetaS Uffix is ​​used to specify a file suffix containing META data.

#Errordocument 500 "The Server Made a Boo Boo.

#Errordocument 404 /missing.html

#Errordocument 404 /ci-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 if there is no access, the server will generate an error code, and it will also respond to a web page that is identified by the client browser.

ErrorDocument is used to set the content of the customer browser, the first parameter of ErrorDocument, which is the wrong number, the second parameter, the second parameter, can be simple text, local web, local CGI program And 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 commands for a specific client, set special parameters to ensure older versions

The compatibility of the enchant and supports the new features of the new browser.

#

# 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

# Iredocument 403 http://phf.apache.org/phf_abuse_log.cgi

#

>> Previous article: Linux Under Apache Server Configuration Raiders (6) >> Next article: Linux Apache Server Configuration Raiders (8)

转载请注明原文地址:https://www.9cbs.com/read-3657.html

New Post(0)