Project

General

Profile

Multiple instances - Ubuntu 20.04/Apache2

Added by Andre Bachtold almost 3 years ago

I have one install of the Redmine on my server.
/path/to/redmine

This is the apache conf

<VirtualHost *:80>
ServerName a.domain.com
RailsEnv production
DocumentRoot /path/to/redmine/public

<Directory "/path/to/redmine/public">
        Allow from all
        Require all granted
</Directory>

ErrorLog ${APACHE_LOG_DIR}/redmine_error.log
CustomLog ${APACHE_LOG_DIR}/redmine_access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =a.domain.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

And it's working great.
Now I want another instance of the redmine in the same server but on completely different path.
/path/to/redmine2

I created the second folder using the same method of the first one. Using the tar of the release. Same permissions.
Apache of the redmine2:

<VirtualHost *:80>
        ServerName b.domain.com
        RailsEnv production2
        DocumentRoot /path/to/redmine2/public

        <Directory "/path/to/redmine2/public">
                Allow from all
                Require all granted
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/redmine2_error.log
        CustomLog ${APACHE_LOG_DIR}/redmine2_access.log combined
</VirtualHost>

I created in both redmines "evironments" folder the production2 file, copying the original.
And do

bundle install
RAILS_ENV=production2 bundle exec rake db:migrate
RAILS_ENV=production2 REDMINE_LANG=en bundle exec rake redmine:load_default_data


In the folder of the redmine2.

But when I go to the domain it goes to the page

We're sorry, but something went wrong.

And the log is on "redmine/log/production2.log" not on "redmine2/log" and uses the plugins of the first, that I don't want on the second.

What configuration am I missing? What did I do wrong?