performance - 在 Apache 中使用 .htaccess 文件

标签 performance apache security

在 Web 应用程序的所有主目录中使用 .htaccess 和“拒绝所有”指令是否存在任何性能问题? Tks。

最佳答案

使用 .htaccess文件会降低 Apache 的速度。如果可以,请修改主服务器配置文件(通常称为 httpd.conf )

从手册:

You should avoid using .htaccess files completely if you have access to httpd main server config file. Using .htaccess files slows down your Apache http server. Any directive that you can include in a .htaccess file is better set in a Directory block, as it will have the same effect with better performance.



http://httpd.apache.org/docs/current/howto/htaccess.html .

另一方面如果您想讨论或争论性能损失与维护简易性的损失,请参阅 Simon Greenhill 的这篇文章|以及他的基准测试结果。

关于performance - 在 Apache 中使用 .htaccess 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17466120/

相关文章:

MySQL 性能 - 删除表行或仅将列标记为已删除

python - django 请求混淆了?

php - 告诉 SELinux 授予 Apache 对文档根目录外的 PHP 文件的执行访问权限

node.js - HTTP X-XSS-Protection 响应 header 是否足以处理反射的 XSS 攻击

javascript - 将文档和窗口引用存储在对象中以获得更好的性能

c# - 读取/写入共享资源的优化/最佳方式

java - 原子长矩阵

apache - 如何配置 Apache HTTP 以便 URL 在没有上下文的情况下为三个 Tomcat 7 Java 应用程序工作

c# - 如何加密用户的用户名和密码?

java - Android 中未找到 KeyGenerator AES 实现