Redmine with Apache: 403 Forbidden
Use Phusion Passenger to run Redmine.
cd /var/www/redmine
gem install passenger
passenger-install-apache2-module
The end of this script will give you some rules to place in httpd.conf
You can test to make sure Passenger is working by running 'passenger start' from your root Redmine directory '/var/www/redmine'. You'll be able to get to your Redmine install via http://redmine.mypage.com:3000
From there configure Apache to run with passenger. You've already got the rules in httpd.conf to load Passenger, just configure your 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>
Related videos on Youtube
marshallslee
Updated on September 18, 2022Comments
-
marshallslee over 1 year
I was working on installing and running Redmine on the Ubuntu server. I'm trying to run Redmine on Apache, so I went to the
etc/apache2/sites-available
and created a file calledsites.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>
And then I linked the file to the
sites-enabled
folder to make the Apache server recognize the configuration.But still I get failed to access the domain, as it keeps saying
403 Forbidden - You don't have permission to access / on this server.
I checked out the log, and I believe this is the point that keeps causing the error to connect to the website.
[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
-
Admin almost 7 yearsDid you reload/restart your apache server after modifying the configuration?
-
Admin almost 7 yearsEvery time I modified the
.conf
file I always re-started the apache server with this command -sudo service apache2 restart
-
Admin almost 7 yearsDid you request it using the declared name
redmine.mypage.com
? -
Admin almost 7 yearsYes.. doesn't work though..
-
Admin almost 7 yearssee with
apachectl -S
. The multifile scheme is confusing, distros should offer a single file conf first, then have an "advanced" package for those who know how to handle those complex schemes.
-