热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

ApacheReferenceManual3

ContentDigestdirectiveSyntax:ContentDigeston|offDefault:ContentDigestoffContext:serverconfig,virtualhost,directory,.htaccessOverride:OptionsStatus:experimentalC

ContentDigest directive Syntax: ContentDigest on|off Default: ContentDigest off Context: server config, virtual host, directory, .htaccess Override: Options Status: experimental Compatibility: ContentDigest is only available in Apache 1.1 and later This directive enables the generation of Content-MD5 headers as defined in RFC1864 respectively RFC2068. MD5 is an algorithm for computing a "message digest" (sometimes called "fingerprint") of arbitrary-length data, with a high degree of confidence that any alterations in the data will be reflected in alterations in the message digest. The Content-MD5 header provides an end-to-end message integrity check (MIC) of the entity-body. A proxy or client may check this header for detecting accidental modification of the entity-body in transit. Example header: Content-MD5: AuLb7Dp1rqtRtxz2m9kRpA== Note that this can cause performance problems on your server since the message digest is computed on every request (the values are not cached). Content-MD5 is only sent for documents served by the core, and not by any module. For example, SSI documents, output from CGI scripts, and byte range responses do not have this header. -------------------------------------------------------------------------------- CoreDumpDirectory directive Syntax: CoreDumpDirectory directory Default: the same location as ServerRoot Context: server config Status: core This controls the directory to which Apache attempts to switch before dumping core. The default is in the ServerRoot directory, however since this should not be writable by the user the server runs as, core dumps wont normally get written. If you want a core dump for debugging, you can use this directive to place it in a different location. -------------------------------------------------------------------------------- DefaultType directive Syntax: DefaultType MIME-type Default: DefaultType text/html Context: server config, virtual host, directory, .htaccess Override: FileInfo Status: core There will be times when the server is asked to provide a document whose type cannot be determined by its MIME types mappings. The server must inform the client of the content-type of the document, so in the event of an unknown type it uses the DefaultType. For example: DefaultType image/gif would be appropriate for a directory which contained many gif images with filenames missing the .gif extension. -------------------------------------------------------------------------------- directive Syntax: ... Context: server config, virtual host Status: Core. and are used to enclose a group of directives which will apply only to the named directory and sub-directories of that directory. Any directive which is allowed in a directory context may be used. Directory is either the full path to a directory, or a wild-card string. In a wild-card string, `? matches any single character, and `* matches any sequences of characters. As of Apache 1.3, you may also use `[] character ranges like in the shell. Also as of Apache 1.3 none of the wildcards match a `/ character, which more closely mimics the behaviour of Unix shells. Example: Options Indexes FollowSymLinks Apache 1.2 and above: Extended regular expressions can also be used, with the addition of the ~ character. For example: would match directories in /www/ that consisted of three numbers. If multiple (non-regular expression) directory sections match the directory (or its parents) containing a document, then the directives are applied in the order of shortest match first, interspersed with the directives from the .htaccess files. For example, with AllowOverride None AllowOverride FileInfo for access to the document /home/web/dir/doc.html the steps are: Apply directive AllowOverride None (disabling .htaccess files). Apply directive AllowOverride FileInfo (for directory /home/web). Apply any FileInfo directives in /home/web/.htaccess Regular expression directory sections are handled slightly differently by Apache 1.2 and 1.3. In Apache 1.2 they are interspersed with the normal directory sections and applied in the order they appear in the configuration file. They are applied only once, and apply when the shortest match possible occurs. In Apache 1.3 regular expressions are not considered until after all of the normal sections have been applied. Then all of the regular expressions are tested in the order they appeared in the configuration file. For example, with ... directives here ... Suppose that the filename being accessed is /home/abc/public_html/abc/index.html. The server considers each of /, /home, /home/abc, /home/abc/public_html, and /home/abc/public_html/abc in that order. In Apache 1.2, when /home/abc is considered, the regular expression will match and be applied. In Apache 1.3 the regular expression isnt considered at all at that point in the tree. It wont be considered until after all normal s and .htaccess files have been applied. Then the regular expression will match on /home/abc/public_html/abc and be applied. Note that the default Apache access for is Allow from All. This means that Apache will serve any file mapped from an URL. It is recommended that you change this with a block such as Order Deny,Allow Deny from All and then override this for directories you want accessible. See the Security Tips page for more details. The directory sections typically occur in the access.conf file, but they may appear in any configuration file. directives cannot nest, and cannot appear in a or section. See also: How Directory, Location and Files sections work for an explanation of how these different sections are combined when a request is received ------------------------------

推荐阅读
  • 本文深入解析了 Apache 配置文件 `httpd.conf` 和 `.htaccess` 的优化方法,探讨了如何通过合理配置提升服务器性能和安全性。文章详细介绍了这两个文件的关键参数及其作用,并提供了实际应用中的最佳实践,帮助读者更好地理解和运用 Apache 配置。 ... [详细]
  • 在Hive中合理配置Map和Reduce任务的数量对于优化不同场景下的性能至关重要。本文探讨了如何控制Hive任务中的Map数量,分析了当输入数据超过128MB时是否会自动拆分,以及Map数量是否越多越好的问题。通过实际案例和实验数据,本文提供了具体的配置建议,帮助用户在不同场景下实现最佳性能。 ... [详细]
  • HTTP协议作为互联网通信的基础,其重要性不言而喻。相比JDK自带的URLConnection,HttpClient不仅提升了易用性和灵活性,还在性能、稳定性和安全性方面进行了显著优化。本文将深入解析HttpClient的使用方法与技巧,帮助开发者更好地掌握这一强大的工具。 ... [详细]
  • 如何在Spark数据排序过程中有效避免内存溢出(OOM)问题
    本文深入探讨了在使用Spark进行数据排序时如何有效预防内存溢出(OOM)问题。通过具体的代码示例,详细阐述了优化策略和技术手段,为读者在实际工作中遇到类似问题提供了宝贵的参考和指导。 ... [详细]
  • 为了在Fragment中直接调用Activity的方法,可以通过定义一个接口并让Activity实现该接口来实现。具体步骤包括:首先在Fragment中声明一个接口,并在Activity中实现该接口。接着,在Fragment中通过类型转换检查Activity是否实现了该接口,如果实现了则调用相应的方法。这种方法不仅提高了代码的解耦性,还增强了模块间的通信效率。此外,还可以通过ViewModel或LiveData等现代Android架构组件进一步优化这一过程,以实现更加高效和可靠的通信机制。 ... [详细]
  • 我正在使用 Ruby on Rails 构建个人网站。总体而言,RoR 是一个非常出色的工具,它提供了丰富的功能和灵活性,使得创建自定义页面变得既高效又便捷。通过利用其强大的框架和模块化设计,我可以轻松实现复杂的功能,同时保持代码的整洁和可维护性。此外,Rails 的社区支持也非常强大,为开发过程中遇到的问题提供了丰富的资源和解决方案。 ... [详细]
  • 深入浅出:前端开发中的JavaScript基础入门
    JavaScript,作为前端开发的核心技术之一,与HTML和CSS并称为Web开发的三大基石。尽管其名称与Java相似,但实际上两者并无直接关联,JavaScript是一门独立的编程语言,与Python、Go和C++等语言一样具有独特的语法和特性。本文将从基础入手,详细介绍JavaScript的基本概念、语法结构及其在现代Web开发中的应用。 ... [详细]
  • jQuery Flot 数据可视化插件:高效绘制图表的专业工具
    jQuery Flot 是一款高效的数据可视化插件,专为绘制各种图表而设计。该工具支持丰富的图表类型和自定义选项,适用于多种应用场景。用户可以通过其官方网站获取示例代码和下载资源,以便快速上手和使用。 ... [详细]
  • BZOJ4240 Gym 102082G:贪心算法与树状数组的综合应用
    BZOJ4240 Gym 102082G 题目 "有趣的家庭菜园" 结合了贪心算法和树状数组的应用,旨在解决在有限时间和内存限制下高效处理复杂数据结构的问题。通过巧妙地运用贪心策略和树状数组,该题目能够在 10 秒的时间限制和 256MB 的内存限制内,有效处理大量输入数据,实现高性能的解决方案。提交次数为 756 次,成功解决次数为 349 次,体现了该题目的挑战性和实际应用价值。 ... [详细]
  • 在《PHP应用性能优化实战指南:从理论到实践的全面解析》一文中,作者分享了一次实际的PHP应用优化经验。文章回顾了先前进行的一次优化项目,指出即使系统运行时间较长后出现的各种问题和性能瓶颈,通过采用一些通用的优化策略仍然能够有效解决。文中不仅详细阐述了优化的具体步骤和方法,还结合实例分析了优化前后的性能对比,为读者提供了宝贵的参考和借鉴。 ... [详细]
  • 作为140字符的开创者,Twitter看似简单却异常复杂。其简洁之处在于仅用140个字符就能实现信息的高效传播,甚至在多次全球性事件中超越传统媒体的速度。然而,为了支持2亿用户的高效使用,其背后的技术架构和系统设计则极为复杂,涉及高并发处理、数据存储和实时传输等多个技术挑战。 ... [详细]
  • Storm学习心得:深入探讨消息可靠传输与一致性事务处理
    在本文中,我们深入探讨了Storm框架在消息可靠传输与一致性事务处理方面的核心机制。通过对消息处理流程的详细分析,结合实际案例,阐述了如何确保数据在分布式环境中的一致性和可靠性。此外,还介绍了Storm中的事务拓扑设计及其在高并发场景下的应用,为开发者提供了宝贵的实践经验和优化建议。 ... [详细]
  • 超分辨率技术的全球研究进展与应用现状综述
    本文综述了图像超分辨率(Super-Resolution, SR)技术在全球范围内的最新研究进展及其应用现状。超分辨率技术旨在从单幅或多幅低分辨率(Low-Resolution, LR)图像中恢复出高质量的高分辨率(High-Resolution, HR)图像。该技术在遥感、医疗成像、视频处理等多个领域展现出广泛的应用前景。文章详细分析了当前主流的超分辨率算法,包括基于传统方法和深度学习的方法,并探讨了其在实际应用中的优缺点及未来发展方向。 ... [详细]
  • MongoDB Aggregates.group() 方法详解与编程实例 ... [详细]
  • 如何在Linux系统中实施网络流量监测与分析
    本文详细介绍了在Linux系统中实施网络流量监测与分析的方法。通过使用专业的工具和技术,读者可以有效地监控和分析网络流量,从而提高系统的安全性和性能。希望本文能为读者提供有价值的参考和实践指导。 ... [详细]
author-avatar
浪漫族屋nr
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有