Apache Handler

本文介绍了Apache服务器中的文件处理机制,包括默认处理器、直接发送文件、CGI脚本等内置处理器,以及如何通过Action指令添加自定义处理器。这些处理器能够根据文件类型或位置执行特定操作。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

       A "handler" is an internal Apache representation of the action to be performed when a file is called. Generally, files have implicit handlers, based on the file type. Normally, all files are simply served by the server, but certain file types are "handled" separately.

 

      Apache 1.1 adds the ability to use handlers explicitly. Based on either filename extensions or on location, handlers can be specified without relation to file type. This is advantageous both because it is a more elegant solution, and because it also allows for both a type and a handler to be associated with a file.

      Handlers can either be built into the server or included in a module, or they can be added with the Action directive. The built-in handlers in the standard distribution are as follows:

     

  • default-handler: Send the file using the default_handler(), which is the handler used by default to handle static content. (core)
  • send-as-is: Send file with HTTP headers as is. (mod_asis)
  • cgi-script: Treat the file as a CGI script. (mod_cgi)
  • imap-file: Parse as an imagemap rule file. (mod_imap)
  • server-info: Get the server's configuration information. (mod_info)
  • server-status: Get the server's status report. (mod_status)
  • type-map: Parse as a type map file for content negotiation. (mod_negotiation)

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值