Added a virtual host to apache, can no longer start redmine!
Added by Matt Schmill over 11 years ago
I had a working instance of Redmine running on Apache2, RHEL 6. Was not installed by me, was running without Virtual Hosts in Apache. Due to recent changes, I had to configure Apache to use Virtual Hosts. Now, Redmine will no longer work. I have gotten a handful of different errors -- I think I've made progress but I'm throwing up my hands at this point because I'm running into Rails routing errors and I am no Rails expert.
I need to be able to run Redmine as a subURI, so I can't point DocumentRoot at the redmine/public directory. Redmine is now in /var/www/html/machine/redmine-1.3.1 and my VirtualHost definition is as follows:
<VirtualHost *:80> ServerName machine.edu DocumentRoot /var/www/html/machine PassengerAppRoot /var/www/html/machine/redmine-1.3.1 RailsBaseURI /redmine-1.3.1 Alias /redmine /var/www/html/machine/redmine-1.3.1/public/ <Directory /var/www/html/machine/redmine-1.3.1/public/> Options FollowSymLinks +ExecCGI AllowOverride all Order allow,deny Allow from all </Directory> </VirtualHost>
Neither machine.edu/redmine nor machine.edu/redmine-1.3.1/public/ work.
The former returns a passenger error: Cannot resolve possible symlink '/var/www/html/machine/redmine': No such file or directory (2)
The latter returns a ruby routing error: No route matches "/redmine-1.3.1/public/" with {:method=>:get}
I have no idea if I need to be rebuilding any config files or if I can wriggle my way out of this with Apache!
Help?!
TIA!
Replies (5)
RE: Added a virtual host to apache, can no longer start redmine!
-
Added by Matt Schmill over 11 years ago
Update: I downloaded Redmine 2.2 and followed the instructions on the Wiki. After some consternation (downloading RPMs not in yum), I managed to get it to build in /var/www/html/machine/redmine-2.2 and ran the migration scripts. Everything appeared to succeed. The new virtual host def in apache:
<VirtualHost *:80> ServerName machine.edu DocumentRoot /var/www/html/machine PassengerAppRoot /var/www/html/machine/redmine-2.2 RailsBaseURI /var/www/html/machine/redmine-2.2 Alias /red "/var/www/html/machine/redmine-2.2/public/" </VirtualHost>
I removed the directory entry because it was causing 403s. The update seems to get me around any routing problems, but it's still not working. Now, when I go to machine.edu/red, I see
Page not found The page you were trying to access doesn't exist or has been removed.
Thanks for any help anyone can provide!
RE: Added a virtual host to apache, can no longer start redmine!
-
Added by Jan Niggemann (redmine.org team member) over 11 years ago
RE: Added a virtual host to apache, can no longer start redmine!
-
Added by Matt Schmill over 11 years ago
jan jan - thanks for your response. I had a look at the article, but that article assumes you are running Redmine with Mongrel or Thin and that you want to proxy through Apache. Apache was running Redmine without issues before the VirtualHosts came into play, I wouldn't think that deploying a Redmine instance in this configuration should be that out of the ordinary.
RE: Added a virtual host to apache, can no longer start redmine!
-
Added by Jan Niggemann (redmine.org team member) over 11 years ago
OK, so read this, it explains sub-uri deployment with passenger...
RE: Added a virtual host to apache, can no longer start redmine!
-
Added by Matt Schmill over 11 years ago
Thanks, Jan. I have not tried working with <Location> tags in Apache. That's the first article I have seen that uses them. I'll try those instructions and hope it helps.