乘客权限被拒绝访问.htaccess

我刚刚完成迁移我的Redmine安装,并用webricktesting后,一切正常,该网站与http://localhost:3000很好地工作

接下来,我安装并configuration了mod_passenger,添加了一个单独的虚拟主机,基本上只复制了以前服务器的configuration。 由于应用程序的绝对path并没有改变,我认为它会马上工作,但这是不正确的,显然乘客没有访问正确的目录。 以下是该虚拟主机的错误日志中出现的内容:

 Permission denied: /srv/redmine/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable 

这里是configuration文件:

虚拟主机

 <VirtualHost *:80> ServerName redmine DocumentRoot /srv/redmine/public ErrorLog /var/log/apache2/redmine_error.log RailsEnv production PassengerRoot /srv/redmine/public <Directory /srv/redmine/public> Options Indexes FollowSymLinks AllowOverride all Order allow,deny allow from all RailsBaseURI / PassengerResolveSymlinksInDocumentRoot on </Directory> </VirtualHost> 

乘客configuration文件

 <IfModule mod_passenger.c> PassengerRoot /usr PassengerRuby /usr/bin/ruby PassengerDefaultUser www-data # Below are some lines to tweak mod-passenger. # This keeps some Ruby processes running, # but the average response time is a lot lower # on low-traffic sites. RailsSpawnMethod smart PassengerPoolIdleTime 3000 RailsAppSpawnerIdleTime 0 PassengerMaxRequests 1000 </IfModule> 

任何想法为什么(根据错误)Passenger试图find/srv/redmine/的.htaccess,而它应该一直在/srv/redmine/public/

我也应该注意到,下面的public /目录是recursion的

提前致谢!

它不仅检查/srv/redmine/.htaccess ,还检查/srv/.htaccess/.htaccess 。 如果启用了AllowOverride Apache将为每个请求统计这些位置 – 它只是logging那个位置,因为它存在,但不能被Apache运行的用户访问。 看到这里 。

试图打开无法打开的.htaccess文件的事实应该与应用程序的function无关。 除了那个警告,应用程序还有什么问题呢?