Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

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>
share|improve this answer

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

share|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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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