.htaccess Wampserver日志级别重写不工作

.htaccess Wampserver日志级别重写不工作,.htaccess,mod-rewrite,wampserver,.htaccess,Mod Rewrite,Wampserver,我正在使用,我想从.htaccess调试我的重写规则,因为我仍然收到404个错误 我已经启用了rewrite_模块、log_debug_模块、log_forensic_模块和log_config_模块,但是在我的错误日志中,我没有收到任何关于.htaccess的信息 在httpd.conf中,我将LogLevel更改为:LogLevel warn mod_rewrite.c:trace8。我还尝试了以下选项:rewrite\u module,mod\u rewrite.so,rewrite,mo

我正在使用,我想从.htaccess调试我的重写规则,因为我仍然收到404个错误

我已经启用了rewrite_模块、log_debug_模块、log_forensic_模块和log_config_模块,但是在我的错误日志中,我没有收到任何关于.htaccess的信息

在httpd.conf中,我将
LogLevel
更改为:
LogLevel warn mod_rewrite.c:trace8
。我还尝试了以下选项:
rewrite\u module
mod\u rewrite.so
rewrite
mod\u rewrite

[Sat Oct 12 17:33:07.063441 2013] [mpm_winnt:notice] [pid 8884:tid 412] AH00422: Parent: Received shutdown signal -- Shutting down the server.
[Sat Oct 12 17:33:09.063556 2013] [mpm_winnt:notice] [pid 1632:tid 288] AH00364: Child: All worker threads have exited.
[Sat Oct 12 17:33:09.078557 2013] [mpm_winnt:notice] [pid 8884:tid 412] AH00430: Parent: Child process 1632 exited successfully.
[Sat Oct 12 17:33:48.859832 2013] [mpm_winnt:notice] [pid 8252:tid 412] AH00455: Apache/2.4.4 (Win64) PHP/5.4.12 configured -- resuming normal operations
[Sat Oct 12 17:33:48.859832 2013] [mpm_winnt:notice] [pid 8252:tid 412] AH00456: Server built: Feb 22 2013 22:08:37
[Sat Oct 12 17:33:48.859832 2013] [core:notice] [pid 8252:tid 412] AH00094: Command line: 'c:\\wamp\\bin\\apache\\apache2.4.4\\bin\\httpd.exe -d C:/wamp/bin/apache/Apache2.4.4'
[Sat Oct 12 17:33:48.867833 2013] [mpm_winnt:notice] [pid 8252:tid 412] AH00418: Parent: Created child process 6216
[Sat Oct 12 17:33:49.145848 2013] [mpm_winnt:notice] [pid 6216:tid 288] AH00354: Child: Starting 150 worker threads.
然后,当我重新启动服务器时,我只会得到这个日志,但当我尝试转到
localhost/mysite
时,我不会收到任何关于web请求的信息

[Sat Oct 12 17:33:07.063441 2013] [mpm_winnt:notice] [pid 8884:tid 412] AH00422: Parent: Received shutdown signal -- Shutting down the server.
[Sat Oct 12 17:33:09.063556 2013] [mpm_winnt:notice] [pid 1632:tid 288] AH00364: Child: All worker threads have exited.
[Sat Oct 12 17:33:09.078557 2013] [mpm_winnt:notice] [pid 8884:tid 412] AH00430: Parent: Child process 1632 exited successfully.
[Sat Oct 12 17:33:48.859832 2013] [mpm_winnt:notice] [pid 8252:tid 412] AH00455: Apache/2.4.4 (Win64) PHP/5.4.12 configured -- resuming normal operations
[Sat Oct 12 17:33:48.859832 2013] [mpm_winnt:notice] [pid 8252:tid 412] AH00456: Server built: Feb 22 2013 22:08:37
[Sat Oct 12 17:33:48.859832 2013] [core:notice] [pid 8252:tid 412] AH00094: Command line: 'c:\\wamp\\bin\\apache\\apache2.4.4\\bin\\httpd.exe -d C:/wamp/bin/apache/Apache2.4.4'
[Sat Oct 12 17:33:48.867833 2013] [mpm_winnt:notice] [pid 8252:tid 412] AH00418: Parent: Created child process 6216
[Sat Oct 12 17:33:49.145848 2013] [mpm_winnt:notice] [pid 6216:tid 288] AH00354: Child: Starting 150 worker threads.
更新
以下是有关我的文件夹结构的更多信息。我已将我的DirectoryRoot放到
D:/www
,我的
.htaccess
文件在
D:/www/mysite

[Sat Oct 12 17:33:07.063441 2013] [mpm_winnt:notice] [pid 8884:tid 412] AH00422: Parent: Received shutdown signal -- Shutting down the server.
[Sat Oct 12 17:33:09.063556 2013] [mpm_winnt:notice] [pid 1632:tid 288] AH00364: Child: All worker threads have exited.
[Sat Oct 12 17:33:09.078557 2013] [mpm_winnt:notice] [pid 8884:tid 412] AH00430: Parent: Child process 1632 exited successfully.
[Sat Oct 12 17:33:48.859832 2013] [mpm_winnt:notice] [pid 8252:tid 412] AH00455: Apache/2.4.4 (Win64) PHP/5.4.12 configured -- resuming normal operations
[Sat Oct 12 17:33:48.859832 2013] [mpm_winnt:notice] [pid 8252:tid 412] AH00456: Server built: Feb 22 2013 22:08:37
[Sat Oct 12 17:33:48.859832 2013] [core:notice] [pid 8252:tid 412] AH00094: Command line: 'c:\\wamp\\bin\\apache\\apache2.4.4\\bin\\httpd.exe -d C:/wamp/bin/apache/Apache2.4.4'
[Sat Oct 12 17:33:48.867833 2013] [mpm_winnt:notice] [pid 8252:tid 412] AH00418: Parent: Created child process 6216
[Sat Oct 12 17:33:49.145848 2013] [mpm_winnt:notice] [pid 6216:tid 288] AH00354: Child: Starting 150 worker threads.
httpd.conf中的一些部分:

<Directory />
    AllowOverride none
    Require all granted
</Directory>

DocumentRoot "D:/www"
<Directory "D:/wamp/www">
    Options Indexes FollowSymLinks
    AllowOverride All

#    Require all granted
#   onlineoffline tag - don't remove
     Order Deny,Allow
     Deny from all
     Allow from 127.0.0.1
     Allow from ::1
     Allow from localhost
</Directory>

#ErrorLog "logs/error.log"
ErrorLog "c:/wamp/logs/apache_error.log"

#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warn rewrite:trace3

可能是因为您使用的是
Apache2.4.x
,如果是这样,他们在日志记录方面做了重大更改

试一试

另一个变化是记录的信息被写入正常错误日志文件

在添加附加信息后添加

您的httpd.conf文件中有一些相当明显的错误

我可以建议您在WAMPServer论坛上查看此文档吗

我刚刚更改了我的WAMPServer Apache配置,如下所示:

LogLevel warn rewrite:trace8
并且在我的apache_error.log中从重写模块中获得了很多额外的行

确保您在服务器上实际运行的是将执行mod_rewrite和
.htaccess

错误:

#WRONG Allows access to the root of your D: drive and all subfolders, great for hackers
<Directory />
    AllowOverride none
    Require all granted
</Directory>

#CORRECTED
<Directory />
    AllowOverride none
    Require all denied
</Directory>

#错误
选项索引跟随符号链接
允许超越所有
#要求所有授权
#onlineoffline标记-不删除
命令拒绝,允许
全盘否定
允许从127.0.0.1开始
允许来自::1
允许从本地主机
#纠正
选项索引跟随符号链接
允许超越所有
#onlineoffline标记-不删除
要求本地

将您的“httpd.conf”日志编辑到

LogLevel alert rewrite:trace3

您应该重新启动apache服务器以应用更改。

是的,我也尝试过这种组合,现在使用的是2.4.4。我仍然没有收到任何调试信息。我将用更多关于文件夹结构和httpd.conf部分的信息更新我的问题。请参阅我答案中的其他信息。我已尝试进行您告诉我的更改,但似乎不起作用
Require all denied
不给我任何权限并返回403。我也尝试了文档中的更改,但这些似乎也没有帮助。在长时间盯着它看的时候发现了我的错误。它说的是
,而不是
,实际上,在这两种情况下,它都应该说
D:/wamp/www
#WRONG
<Directory "D:/wamp/www">
    Options Indexes FollowSymLinks
    AllowOverride All

#    Require all granted
#   onlineoffline tag - don't remove
     Order Deny,Allow
     Deny from all
     Allow from 127.0.0.1
     Allow from ::1
     Allow from localhost
</Directory>


#CORRECTED
<Directory "D:/wamp/www">
    Options Indexes FollowSymLinks
    AllowOverride All

#   onlineoffline tag - don't remove
     Require local
</Directory>
LogLevel alert rewrite:trace3