I have these two sites defined in my apache2 server.

Redmine server

#REDMINE SITE (/etc/apache2/sites-available/redmine)
<VirtualHost *:8080>
        # this is the passenger config
        RailsEnv production
        RailsBaseURI /redmine
        SetEnv X_DEBIAN_SITEID "default"
        Alias "/redmine/plugin_assets/" /var/cache/redmine/default/plugin_asset$
        DocumentRoot /usr/share/redmine/public
        <Directory "/usr/share/redmine/public">
                Order allow,deny
                Allow from all
        </Directory>
</VirtualHost>

And a tomcat server

#TOMCAT (/etc/apache2/sites-available/default)
<VirtualHost *:8080>
  JkMount /* worker1
  JkUnMount /redmine worker1
</VirtualHost>

My problem is that the redmine site seems to be mapped to the root of the apache server / instead of /redmine how can i fix this?

link|improve this question

25% accept rate
feedback

2 Answers

Your site's document root is already mapped to the public folder. Set DocumentRoot to somewhere else then Alias /redmine /usr/share/redmine/public

link|improve this answer
this doesn't seem to work. all i get is a 404 when accessing /redmine – netbrain May 22 '11 at 13:51
@netbrain You will need to alias it somehow, I assume you got the directories wrong. Mapping directly to /app/public will show the app at root – sam May 22 '11 at 15:28
could you provide an example config? – netbrain May 22 '11 at 18:52
feedback

This is the working config i ended up with.

<VirtualHost *:8080>

        DocumentRoot /var/www
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>

        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>

        ErrorLog /var/log/apache2/error.log

        LogLevel warn

       <Directory /var/www/redmine>
                   RailsBaseURI /redmine
                   PassengerResolveSymlinksInDocumentRoot on
      </Directory>

  JkMount /* worker1
  JkUnMount /redmine worker1
  JkUnMount /redmine/* worker1


</VirtualHost>
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.