我正在Ubuntu服务器上安装和运行Redmine。 我试图在Apache上运行Redmine,所以我去了etc/apache2/sites-available并创build了一个名为sites.conf的文件。
<VirtualHost *:80> ServerName redmine.mypage.com DocumentRoot /var/www/redmine/public <Directory /var/www/redmine/public> DirectoryIndex index.html index.htm Require all granted </Directory> ErrorLog /var/log/apache2/localhost-error_log CustomLog /var/log/apache2/localhost-access_log common </VirtualHost>
然后我将文件链接到sites-enabled文件夹,以使Apache服务器识别configuration。
但是我仍然无法访问域,因为它一直说403 Forbidden - You don't have permission to access / on this server.
我检查了日志,我相信这是不断导致错误连接到网站的一点。
[Tue Jul 04 17:56:37.825217 2017] [autoindex:error] [pid 4815] [client 192.168.5.6:51457] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.cgi,index.pl,index.php,index.xhtml,index.htm) found, and server-generated directory index forbidden by Options directive
使用Phusion Passenger运行Redmine。
cd /var/www/redmine gem install passenger passenger-install-apache2-module
这个脚本的结尾会给你一些放在httpd.conf中的规则
您可以通过运行根目录Redmine目录“/ var / www / redmine”中的'passenger start'来确保Passenger正在运行。 你可以通过http://redmine.mypage.com:3000进入你的Redmine安装
从那里configurationApache与乘客运行。 您已经在httpd.conf中加载了Passenger的规则,只需configuration您的vhost即可。
<VirtualHost *:80> ServerName redmine.mypage.com DocumentRoot /var/www/redmine ## Get this from PassengerDefaultRuby you added to httpd.conf PassengerRuby /path-to-ruby <Directory /var/www/redmine/public> Allow from all Options -MultiViews </Directory> </VirtualHost>