我已经build立了我的VPS,在yum install httpd下yum install httpd并重新启动了服务器。 当我向/var/www/html添加一个.htaccess ,什么都不起作用,htaccess文件中的哪个内容需要身份validation,除了给我一个“受保护的”目录外,什么都不显示。
AuthType Basic AuthName "Private" AuthUserFile /var/www/html/.htpasswd Require valid-user
.htpasswd存在,但仍然没有任何工作。 我也尝试了一个简单的重写规则,甚至没有工作。
你如何让Apache工作(或正常运行)? 一切都运行正常,除了Apache。
我的服务器正在运行Centos 5 x86_64 Standard 。
你需要允许覆盖htaccess工作。
看到这个http://httpd.apache.org/docs/2.0/mod/core.html看看“AllowOverride”