Project

General

Profile

Help needed on Redmine installation! Sub-URI for Passenger with Apache 2 does not work!

Added by Kevin Kan almost 13 years ago

Hi,

I am trying to setup Redmine 1.1.3 application on my Ubuntu 8.04 with
Apache2 and Passenger 3.0.7.
I have verified that my installation of Redmine is working properly by
running Webrick as web server. As I have read that it is not the
recommended webserver for Production, I have decided to host it using
Apache 2.

I am planning to configure the Apache webserver to support sub-URI,
with reference to the guide:
http://www.modrails.org/documentation/Users%20guide%20Apache.html#deploying_rails_to_sub_uri.
However, I am having some problem with the configuration of the
Apache2's config file called "default" in the "sites-available"
folder.
Below is my configuration in the "default" file:
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName www.mydomain.com
DocumentRoot /var/www
  1. DocumentRoot /usr/local/redmine-1.1.3/public
    <Directory />
    Options FollowSymLinks
    AllowOverride None
    </Directory>
    <Directory /var/www>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    allow from all
    </Directory>
    <Directory /var/www/redmine>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride all
    Order allow,deny
    allow from all
    </Directory>
    RailsBaseURI /redmine
    RailsEnv production
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
&lt;Directory "/usr/lib/cgi-bin"&gt;
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
&lt;/Directory&gt;
ErrorLog /var/log/apache2/error.log
  1. Possible values include: debug, info, notice, warn, error, crit,
  2. alert, emerg.
    LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature On
Alias /doc/ "/usr/share/doc/" 
&lt;Directory "/usr/share/doc/"&gt;
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
&lt;/Directory&gt;

</VirtualHost>

This configuration has returned with a "no such file to load -- /var/
www/config/environment" error, after accessing Redmine via "http"//
www.mydomain.com/redmine".

This error is only overcome if I change the "Document Root" to "/usr/
local/redmine-1.1.3/public", which is where the Redmine application
codes is located.

Note:
1. I have already created the symlink in "/var/www/redmine" as
described in the guide.
2. I have also "chown" the entire "redmine-1.1.3" folders and files
(recursively) to "www-data".

I will appreciate if anyone can help me to configure my setup
correctly as I really hope to make use of the sub-URI approach, so
that I can maintain the use of a common port "80" for multiple
applications.

Thank you in advance.

Cheers,
Kevin
-----------------