LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1263|回复: 5

求httpd-2.2.4中关于目录访问控制权限的配置

[复制链接]
发表于 2007-6-17 11:34:16 | 显示全部楼层 |阅读模式
在 httpd-2.0.48中觉得目录访问权限的配置很简单,但是到了httpd-2.2.4中就觉得很费劲了!!!

APACHE是自己编译的,已经在httpd.conf中
# Various default settings
Include conf/extra/httpd-default.conf
把这个注释去掉了,进入conf/extra/目录中在httpd-default.conf
中加入了如下语句:
DocumentRoot "/mnt/wine/smovie/"
Alias /user/ "/mnt/wine/smovie/"
<Directory "/mnt/wine/smovie">
   Options Indexes FollowSymLinks
   AllowOverride Options
   Order allow,deny
   Allow from all
</Directory>
<Directory "/mnt/wine/smovie/">
  Allowoverride none
  authtype basic
  authname "Sorry,Deny anonymous user.you must have password!"
  authuserfile /opt/.password
  require valid-user
</Directory>

这里面的/mnt/wine/smovie目录为windows分区,这个目录我想需要用户名和密码才能访问的.但是进入http://local/user/这个路径后提示如下,不知何解?


Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, you@example.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.


--------------------------------------------------------------------------------

Apache/2.2.4 (Unix) mod_ssl/2.2.4 OpenSSL/0.9.7a PHP/4.4.7 Server at 172.16.12.1 Port 80



请有知道的高手提供解决方案!!!!@谢谢!!!!
发表于 2007-6-17 18:39:01 | 显示全部楼层
error.log怎么说?http://localhost/访问正常?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-6-18 17:46:35 | 显示全部楼层
http://localhost/访问是正常 ... 出现如下文字:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, you@example.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.


--------------------------------------------------------------------------------

Apache/2.2.4 (Unix) mod_ssl/2.2.4 OpenSSL/0.9.7a PHP/4.4.7 Server at 172.16.12.1 Port 80


再想请教的是,在httpd.conf里面设定了目录属性,但是却老说没有权限这点感到郁闷!!!!
比如说:我想把访问http://localhost/movie目录

Alias /movie/ "/home/movie/"
<Directory "/home/movie">
Allow from all
</Directory>
也已经在httpd.conf做了引用了,但却访问http://localhost/movie老说没 ... 面必须要注明
Documentroot /home/         (我服务器的WEB目录)
这个地方不得其解?
假如我的文件分步在好几个地方呢,假如都这样注释的话,那岂不是乱套了?
回复 支持 反对

使用道具 举报

发表于 2007-6-18 17:57:44 | 显示全部楼层
可能是apache无法读/home/movie目录,请贴error.log。
回复 支持 反对

使用道具 举报

发表于 2007-6-25 15:36:20 | 显示全部楼层
用htpasswd来控制访问吧。
回复 支持 反对

使用道具 举报

发表于 2007-6-27 18:36:54 | 显示全部楼层
真是头痛````````
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表