Danh mục

Linux all in one desk reference for dummies phần 9

Số trang: 81      Loại file: pdf      Dung lượng: 1.43 MB      Lượt xem: 11      Lượt tải: 0    
tailieu_vip

Phí tải xuống: 21,000 VND Tải xuống file đầy đủ (81 trang) 0
Xem trước 9 trang đầu tiên của tài liệu này:

Thông tin tài liệu:

Tham khảo tài liệu linux all in one desk reference for dummies phần 9, công nghệ thông tin, hệ điều hành phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả
Nội dung trích xuất từ tài liệu:
Linux all in one desk reference for dummies phần 9566 Configuring the Apache Web Server ✦ ErrorDocument errortype filename: Specifies a file that the server sends when an error of a specific type occurs. You can also provide a text message for an error. Here are some examples: ErrorDocument 403 “Sorry, no access to this directory” ErrorDocument 403 /error/noindex.html ErrorDocument 404 /cgi-bin/bad_link.pl ErrorDocument 401 /new_subscriber.html If you don’t have the ErrorDocument directive, the server sends a built- in error message. The errortype can be one of the following HTTP/1.1 error conditions (see RFC 2616 at www.ietf.org/rfc/rfc2616.txt or www.faqs.org/rfcs/rfc2616.html for more information): • 400: Bad Request • 401: Unauthorized • 402: Payment Required • 403: Forbidden • 404: Not Found • 405: Method Not Allowed • 406: Not Acceptable • 407: Proxy Authentication Required • 408: Request Timeout • 409: Conflict • 410: Gone • 411: Length Required • 412: Precondition Failed • 413: Request Entity Too Large • 414: Request-URI Too Long • 415: Unsupported Media Type • 416: Requested Range Not Satisfiable • 417: Expectation Failed • 500: Internal Server Error • 501: Not Implemented • 502: Bad Gateway • 503: Service Unavailable • 504: Gateway Timeout • 505: HTTP Version Not Supported TEAM LinG - Live, Informative, Non-cost and Genuine ! 567 Configuring the Apache Web Server ✦ TypesConfig filename: Specifies the file that contains the mapping of file extensions to MIME data types. (MIME stands for Multipurpose Internet Mail Extensions, a way to package attachments in a single mes- sage file.) The server reports these MIME types to clients. If you don’t specify a TypesConfig directive, httpd assumes that the TypesConfig file is /etc/mime.types. The following are a few selected lines from the default /etc/mime.types file: application/msword doc application/pdf pdf application/postscript ai eps ps application/x-tcl tcl audio/mpeg mpga mp2 mp3 audio/x-pn-realaudio ram rm audio/x-wav wav image/gif gif image/jpeg jpeg jpg jpe image/png png text/html html htm text/plain asc txt video/mpeg mpeg mpg mpe Each line shows the MIME type (such as text/html), followed by the file extensions for that type (html or htm). Book VIIAccess-control directives Chapter 2Access-control directives enable you to control who can access different direc-tories in the system. These are the global access-configuration directives. You Running a Webcan also have another access-configuration file that uses a name specified by Serverthe AccessFileName directive in every directory from which the Apache Webserver can serve documents. (That per-directory access-configuration file isnamed .htaccess by default.)Stripped of most of its comment lines, the access-control directive has thisformat:# First, we configure the “default” to be a# very restrictive set of permissions. Options FollowSymLinks AllowOverride None# The following directory name should# match DocumentRoot in httpd.conf Options Indexes FollowSymLinks AllowOverride None order allow,deny allow from all TEAM LinG - Live, Informative, Non-cost and Genuine !568 Configuring the Apache Web Server # The directory name should match the # location of the cgi-bin directory AllowOverride None Options None Order allow,deny Allow from all Access-control directives use a different syntax from the other Apache direc- tives. The syntax is like ...

Tài liệu được xem nhiều: