Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache 如何调试htaccess进程_Apache_.htaccess_Magento_Logging_Trace - Fatal编程技术网

Apache 如何调试htaccess进程

Apache 如何调试htaccess进程,apache,.htaccess,magento,logging,trace,Apache,.htaccess,Magento,Logging,Trace,我的magento商店在htaccess中有以下内容: ## TRACE and TRACK HTTP methods disabled to prevent XSS attacks RewriteCond %{REQUEST_METHOD} ^TRAC[EK] RewriteRule .* - [L,R=405] 我想记录我的htaccess过程中发生的事情。我已尝试添加此代码: RewriteLog "/var/log/apache2/rewrite.log" RewriteLogLeve

我的magento商店在htaccess中有以下内容:

## TRACE and TRACK HTTP methods disabled to prevent XSS attacks
RewriteCond %{REQUEST_METHOD} ^TRAC[EK]
RewriteRule .* - [L,R=405]
我想记录我的htaccess过程中发生的事情。我已尝试添加此代码:

RewriteLog "/var/log/apache2/rewrite.log"
RewriteLogLevel 2
但在使用重写日志行运行时,我得到了一个“内部服务器错误”或一个找不到的错误

有什么建议/帮助吗


谢谢

如前所述,您无法从htaccess文件内部打开重写日志,而且由于您在GoDaddy的围墙花园中,因此您也无能为力

有什么建议/帮助吗

创建脱机测试服务器:

  • 查找linux计算机或在windows计算机上的virtualbox中安装一台
  • 安装apache
  • 安装php或magento需要的任何其他模块
  • 将整个网站移动到
    /var/www/localhost/htdocs
    目录(或文档根所在的位置)
  • 在apache的配置中,启用“重写日志”
  • 转到
    http://localhost/your-site
    然后查看日志上的内容

  • 您不能在.htaccess文件中使用
    RewriteLog
    RewriteLogLevel
    。从httpd.conf设置日志文件,您可以在存储中激活去bug,以了解magento背后在做什么。检查这个秋葵:那我该怎么办?我在GoDaddy Linux服务器中,我想我没有访问httpd.conf的权限。MMU:存储调试很有用,但在这种情况下不行,因为问题出在服务器端(在Magento之前)。请尝试或准确地尝试,不要使用一些技巧来查看变量。我这样浪费了很多时间: