Project

General

Profile

Home does not work, other links work fine

Added by Viktor Kostadinov over 8 years ago

Hi guys,
I've recently updated my server to Ubuntu 16.04 and I'm experiencing problems with Redmine install. It's working just fine if I access it via any link like
http://support.blahblah.com/settings
http://support.blahblah.com/issues/173
But if I try to go to home
http://support.blahblah.com
I just get a list of files in /public directory. I've tried updating to latest 3.0 version, then I installed fresh 3.2 into a new dir, but I still get the same behaviour - all links work EXCEPT /. I'm totally confused ;)

I'm running:
Ubuntu 16.04
Apache 2.4.18
Phusion Passenger 5.0.8
Redmine v3.2.2
Ruby 2.2.2
Rails 4.2.5.2

Been checking virtual hosts setup many times, but I can't find anything wrong - though I assume the problem is hidden in Apache config. Therefore, I'll paste my VirtualConf here

<VirtualHost *:80>
    ServerName support.blahblah.com
    DocumentRoot /var/www/html/redmine32/public
    RailsEnv production

    ErrorLog ${APACHE_LOG_DIR}/support_error.log
    CustomLog ${APACHE_LOG_DIR}/support_access.log combined

        <Directory /var/www/html/redmine32/public>
            AllowOverride all
            Options -MultiViews +FollowSymLinks
            Require all granted
        </Directory>
        PassengerUser www-data
        PassengerGroup www-data
</VirtualHost>

And here are the lines from apache2.conf that activate passenger

LoadModule passenger_module /root/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/passenger-5.0.8/buildout/apache2/mod_passenger.so
   <IfModule mod_passenger.c>
     PassengerRoot /root/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/passenger-5.0.8
     PassengerDefaultRuby /root/.rbenv/versions/2.2.2/bin/ruby
   </IfModule>

Paths to Ruby are OK - double checked.

I hope someone can shed some light on this ;)

Thank you,
Vic


Replies (2)

RE: Home does not work, other links work fine - Added by Olivier Houdas over 8 years ago

Maybe try and set

RailsBaseURI /

in your <virtualhost> configuration? (right after DocumentRoot)

RE: Home does not work, other links work fine - Added by Viktor Kostadinov over 8 years ago

I solved the problem, so I thought I should share, but I can't tell I'm 100% sure what helped.

- I removed Ruby (installed as .rbenv) and installed the latest version
- I also updated rails on server though this does not seem to make any changes to Redmine since it has it's own rails
- I updated Passenger to 5.0.28 (latest at the moment I'm writing this)
- I cleared all caches using commands from Redmine update tutorial (bundle exec rake tmp:cache:clear tmp:sessions:clear RAILS_ENV=production)
- I also fiddled a bit with virtualhost config though this turned out to be irrelevant
- Learned that PassengerUser and Passenger group are important so that redmine can write files to upload dir etc (check Administration/Information to see if this works)
- All of this led me to an REDMINE ERROR PAGE instead of the directory listing when I try to access / - so a huge change :)

Lastly, I fixed the error page by REMOVING .htaccess from /public directory, which I placed there myself in an attempt to fix original issue. The .htaccess was a copy of htaccess.fcgi.example, and it's probably 100% OK IF you're using fcgi - which I'm not.

So I'm still unsure what caused original problem I had, but maybe this will help someone to look in the right direction.

Cheers

    (1-2/2)