Redmine with Apache: 403 Forbidden

5,131

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>
Share:
5,131

Related videos on Youtube

marshallslee
Author by

marshallslee

Updated on September 18, 2022

Comments

  • marshallslee
    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 called 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>
    

    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
      Admin almost 7 years
      Did you reload/restart your apache server after modifying the configuration?
    • Admin
      Admin almost 7 years
      Every time I modified the .conf file I always re-started the apache server with this command - sudo service apache2 restart
    • Admin
      Admin almost 7 years
      Did you request it using the declared name redmine.mypage.com?
    • Admin
      Admin almost 7 years
      Yes.. doesn't work though..
    • Admin
      Admin almost 7 years
      see 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.