Project

General

Profile

Apache2 VirtualHost plugin_assets - Redmine running multiple instances (debian)

Added by Meindert Oldenburger over 6 years ago

Its about an standard installation of the debian package redmine with multiple instances

Below apache2 configuration is working, but the plugin_assets directory, belonging to specific instance, not.

The different instances can be retrieved via: http://[server]/redmine_default or http://[server]/redmine_comol5 etc.

The default plugin_assets is read (/usr/share/redmine/public/plugin_assets) instead of the specific instance one (/var/cache/redmine/default/plugin_assets/)

Virtualhost:

NameVirtualHost *:80

<VirtualHost *:80>

     DocumentRoot /var/www
     # DocumentRoot /usr/share/redmine/public/
     Alias /redmine_default     /var/www/redmine_default/public/
     Alias /redmine_comol5      /var/www/redmine_comol5/public/
     Alias /redmine_l2t         /var/www/redmine_l2t/public/
     # Alias "/plugin_assets/"  /var/cache/redmine/default/plugin_assets/

     PassengerDefaultUser www-data
     PassengerRuby /usr/bin/ruby

<If "%{REQUEST_URI} =~ m#^/redmine_default/.*#">

     # ServerName i3
     # this is the passenger config
     RailsEnv production
     SetEnv X_DEBIAN_SITEID "default" 
     # CHANGE PassengerAppGroupName FOR OTHER INSTANCES
     PassengerAppGroupName redmine_default

#     SetEnv X_REDMINE_PLUGINS "/var/cache/redmine/default/plugin_assets/" 

</If>
<ElseIf "%{REQUEST_URI} =~ m#^/redmine_comol5/.*#">

     # ServerName i3
     # this is the passenger config
     RailsEnv production
     SetEnv X_DEBIAN_SITEID "comol5" 
     # CHANGE PassengerAppGroupName FOR OTHER INSTANCES
     PassengerAppGroupName redmine_comol5

</ElseIf>
<ElseIf "%{REQUEST_URI} =~ m#^/redmine_l2t/.*#">

     # ServerName i3
     # this is the passenger config
     RailsEnv production
     SetEnv X_DEBIAN_SITEID "l2t" 
     # CHANGE PassengerAppGroupName FOR OTHER INSTANCES
     PassengerAppGroupName redmine_l2t

</ElseIf>

     #<Directory /var/www/redmine_default/public/ >
     <Directory /redmine_default >
         Allow from all
         Options FollowSymLinks
         Options -MultiViews
         Require all granted
         AllowOverride all
     </Directory>
     # These have been added:
     <Location /redmine_default>
         PassengerBaseURI /redmine_default
         PassengerAppRoot /var/www/redmine_default
        # PassengerBaseURI /usr/share/redmine/public
        # PassengerAppRoot /usr/share/redmine
     </Location>

     <Directory "/var/cache/redmine/default/plugin_assets/">
         Allow from all
         Options FollowSymLinks
         Options -MultiViews
         Require all granted
     </Directory>

     <Directory /var/www/redmine_comol5/public/ >
         Allow from all
         Options FollowSymLinks
         Options -MultiViews
         Require all granted
         AllowOverride all
     </Directory>
     # These have been added:
     <Location /redmine_comol5>
         PassengerBaseURI /redmine_comol5
         PassengerAppRoot /var/www/redmine_comol5
     </Location>

     <Directory /redmine_l2t >
         Allow from all
         Options FollowSymLinks
         Options -MultiViews
         Require all granted
         AllowOverride all
     </Directory>
     # These have been added:
     <Location /redmine_l2t>
         PassengerBaseURI /redmine_l2t
         PassengerAppRoot /var/www/redmine_l2t
     </Location>