为什么dir_module似乎没有加载,但显然它是在httpd.conf和模块文件夹装? [英] Why dir_module does NOT seem to load, although clearly it is loaded in httpd.conf and modules folder?

查看:1190
本文介绍了为什么dir_module似乎没有加载,但显然它是在httpd.conf和模块文件夹装?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我检查有的LoadModule dir_module模块/ mod_dir.so httpd.conf文件
取消注释了。我还检查Apache模块文件夹中看到,mod_dir.so也在那儿。但还是module_dir似乎并没有在所有已加载。

I checked the httpd.conf file which has "LoadModule dir_module modules/mod_dir.so " uncommented already. I also check the apache modules folder seeing that mod_dir.so is there too. BUT still the module_dir does not seem to have loaded at all.

因为当我试图建立这个虚拟文件夹,如果我放线
     别名/ myblogD:/ PHP /试穿
像下面的ifmodule指令里面的:

Because when I tried to set up this virtual folder, if I put the line Alias /myblog "D:/php/try" inside the ifmodule directive like the following:

<IfModule dir_module>
    DirectoryIndex index.html index.htm index.php
    Alias /myblog "D:/php/try"
   <Directory "d:/php/try">
   Order allow,deny
   Allow from all
   </Directory> 
</IfModule>

这是行不通的,当被访问URL /博客阿帕奇说错误404没有找到。

It would NOT work, when accessed by url /blog apache says error 404 not found.

但是,如果我放线结果
       别名/ myblogD:/ PHP /试试结果
在ifmodule指令之外,则该行会工作,Apache可以找到该文件夹​​。所以我认为这是因为module_dir尚未加载。

But if I put the line
Alias /myblog "D:/php/try"
outside the ifmodule directive, then the line will work and apache can find the folder. So I think it's because the module_dir hasn't been loaded yet.

但我怎么可以加载呢?我已经选中上面提到的两个地方,这似乎表明,它已经加载。请帮忙。先谢谢了。

But how can I load it? I already checked the two places as mentioned above which seem to suggest that it is loaded already. Please help. Thanks in advance.

P.S。我的平台是Windows 7

p.s. My platform is windows 7

推荐答案

删除&LT; IfModule&GT; 标签和只有的DirectoryIndex index.html的index.cgi文件index.pl的index.php的index.xhtml (在httpd.conf)。在Windows 7环境下为我工作。

Remove the <IfModule> tags and only have DirectoryIndex index.html index.cgi index.pl index.php index.xhtml (in httpd.conf). That works for me in Windows 7 environment.

这篇关于为什么dir_module似乎没有加载,但显然它是在httpd.conf和模块文件夹装?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆