views:

19

answers:

1

I'm trying to install Redmine, and I am having trouble making Phusion Passenger work with any directories other than the DocumentRoot.

I've put the public directory downloaded from Redmine into ~/www/public/entry/redmine.mysite.com/, and the rest of the directories in ~/www/app/redmine.mysite.com/.

I've added the following line to the .htaccess file inside the public folder:

PassengerAppRoot ~/www/app/redmine.mysite.com

Whenever I try to load up the page, it just gives me the plain Mozilla file not found page.

Any thoughts?


Additional Info:

I have a codebase set up so that apache resolves any given request URI to a particular entry folder, as follows:

DocumentRoot is ~/www/public

In this folder is a .htaccess file, including the following rule:

RewriteCond ${lowercase:%{SERVER_NAME}} ^(dev\.)?(stg\.)?(www\.)?(.*)$
RewriteCond %{REQUEST_URI} !^/resource/(.*)$
RewriteRule !^entry/ entry/%4%{REQUEST_URI}

If I create a new VirtualHost for port 3000, with DocumentRoot=~/www/public/entry/redmine.mysite.com/, everything loads up correctly.

However, if instead I use my codebase's mod_rewrite-based resolution, I get a page not found error.


If I visit redmine.mysite.com/404.html, it loads the 404.html page that is in the correct folder.


If I change the PassengerAppRoot to ~/www/app/redmine.mysite.com/test, it informs me that the directory does not appear to be a valid Ruby on Rails application root.

A: 

Looks like the solution was to set RailsBaseURI to the path relative from the DocumentRoot on the server, not the REQUEST_URI!

I had thought it referred to the actual URI string, but it turns out that is not the case!

Kevin Dolan
...except now all the links generated have /entry/... in them.
Kevin Dolan