Configuring multiple instances of redmine with apache / passenger

I am working on setting up a pair of redmine instances on the same server under apache.

The first one worked perfectly, and I have a virtual host configured for it with the following vhost configuration:

<VirtualHost *:80> ServerName tickets.domain.com DocumentRoot /var/www/redmine RailsEnv production RailsBaseURI / PassengerResolveSymlinksInDocumentRoot on </VirtualHost> 

The second thing I needed to set as a subdirectory from the default main site:

 Alias /ops/ "/var/www/ops/" <Directory "/var/www/ops/"> RailsEnv ops RailsBaseURI /ops PassengerResolveSymlinksInDocumentRoot on </Directory> 

So server / ops is the URL for the second instance.

The problem I am facing is that when I restart apache, no matter what URL you choose, it first seems to β€œwin” and it interrupts another instance of the site. If I click on / ops -url, then it will load just fine, but it will work with tickets. will cause me to get permission to reject errors because all urls have / ops in them (for JS and other files)

If I restart apache and hit the tickets. It loads at first, but I get 404 errors from Redmine on ur / ops.

This is on Ubuntu with redmine PPA, and / var / www / ops and / var / www / redmine are symbolic links to the common redmine source code with their own environments (production and ops).

Any tips on how I can make these two living side by side successful?

thanks

+4
source share
2 answers

This is my apache configuration, which hosts multiple instances of redmine (domain.tld / dev1, domain.tld / dev2, ...).

You also need to change: key and: session_path in config / initializers / session_store.rb of each redmine setting.

 <IfModule mod_ssl.c> <VirtualHost _default_:443> Servername domain.tld ServerAdmin webmaster@domain.tld DefaultInitEnv RAILS_ENV production DefaultInitEnv GEM_PATH /var/lib/gems/1.8 DocumentRoot /var/www/default-ssl <Directory /var/www/default-ssl> AuthType Basic AuthName "secure section" AuthUserFile /etc/apache2/htpasswd Require valid-user Options +FollowSymLinks +ExecCGI RewriteEngine On RewriteRule ^$ index.html [QSA] RewriteRule ^([^.]+)$ $1.html [QSA] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] ErrorDocument 500 "Application error Rails application failed to start properly" AllowOverride None Order allow,deny allow from all </Directory> LogLevel warn ErrorLog /ssl_error.log CustomLog /ssl_access.log combined ServerSignature Off SSLEngine on SSLCertificateFile /etc/ssl/certs/domain.tld.crt SSLCertificateKeyFile /etc/ssl/private/domain.tld.key SSLCACertificateFile /etc/ssl/certs/domain.tld.ca <FilesMatch "\.(cgi|shtml|phtml|php)$"> SSLOptions +StdEnvVars </FilesMatch> BrowserMatch "MSIE [2-6]" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0 BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown Alias /dev1 /var/www/default-ssl/dev1/public <Directory /var/www/default-ssl/dev1/public> PassengerAppRoot /var/www/default-ssl/dev1 RailsBaseURI /dev1 Require user user1 user2 </Directory> Alias /dev2 /var/www/default-ssl/dev2/public <Directory /var/www/default-ssl/dev2/public> PassengerAppRoot /var/www/default-ssl/dev2 RailsBaseURI /dev2 Require user user1 </Directory> ... </VirtualHost> </IfModule> 
+1
source

Track-based indentation configurations. Please check out the Ubuntu error database: Multiple redmine instances do not work with the passenger

create directories for each configuration:

 /var/lib/redmine/*configname* 

create a symbolic link from the redmine directory:

 ln -s /usr/share/redmine /var/lib/redmine/*configname*/passenger 

in your apache virtual host you can add an alternative PassengerAppRoot:

 PassengerAppRoot /var/lib/redmine/*configname*/passenger 
0
source

All Articles