How to create a second Redmine instance?

Keywords: Redmine - Installers - How to - Application configuration

Description:
Hi
I’ve found lots of topics but none really works

We are using RedMine 4.2.3-0 on a windows server 2019
We want to have a second Redmine instance on this server

As seen on the forum, I made a second install with another port in another directory and change the config files in order to have only one Apache and MySql service

What are the files to modify?
I’ve modified a lot but it seems I’ve missed some
For the moment, it recognize the port but I have the “Not found, the requester URL was not found on this server” error
thank you

Hi @denis.maillard ,

We do not have any guide to achieve this but you can do the following instead of installing a new stack in the system:

  • Copy the installdir/apps/redmine folder to installdir/apps/new_redmine
  • Update the conf files inside installdir/apps/new_redmine/conf to use the new directory
  • Add the information to apache. You will need to edit the installdir/apache2/conf/bitnami/bitnami-apps-prefix.conf file
  • Create a new database and update the configuration in the app’s conf file installdir/apps/new_redmine/htdocs
  • Restart the Apache service and try to access the new app using localhost/new_redmine. Please note that the alias must be configured so you access the first installation using /redmine and the new one using /new_redmine

As I mentioned, we do not have any guide and we do not provide support to this kind of installation. The steps I mentioned above should work, but please take into account that all references to the previous installation must be updated.

Hi
Thank you for you help
I do not succeed in making alias
To be honest, my Apache knowledge is quite small

How to configure alias?
thank you

Hi @denis.maillard,

Please check the official documentation of Apache to know more about it

https://httpd.apache.org/docs/current/mod/mod_alias.html#alias

I forgot to mention in my previous message that you will need to install new thin services (apps/new_redmine/scripts folder) to serve that new Redmine and configure them in the installdir/properties.ini file for the manager tool to be able to access the information about the status of those new services.

Hi
Thank you for your answer, I still need your help
My second instance’s name is “suiviprojets”

I have created 2 services Thin_redmine-SP and Thin_redmine2-SP on ports 3003 and 3004
I can see the 2 running on the manager windows

I have updated the files in redmine-suiviprojets/conf
Here is httpd-prefix.conf:

ProxyPass /redmine balancer://redminecluster
ProxyPassReverse /redmine balancer://redminecluster

ProxyPass /suiviprojets balancer://redminecluster
ProxyPassReverse /suiviprojets balancer://redminecluster


<Proxy balancer://redminecluster>
    BalancerMember http://127.0.0.1:3003/suiviprojets
    BalancerMember http://127.0.0.1:3004/suiviprojets
</Proxy>

Include "D:\Bitnami\redmine-4.2.3-0/apps/redmine-suiviprojets/conf/httpd-app.conf"

httpd-vhosts.conf:

<VirtualHost *:81>
    ServerName redmine.example.com
    ServerAlias www.redmine.example.com
    DocumentRoot "D:\Bitnami\redmine-4.2.3-0/apps/redmine-suiviprojets/htdocs/public"
    <Directory "D:\Bitnami\redmine-4.2.3-0/apps/redmine-suiviprojets/htdocs/public">
        Options -MultiViews
        allow from all
    </Directory>

    RewriteEngine On
    RewriteRule ^/(.*)$ balancer://redminecluster%{REQUEST_URI} [P,QSA,L]
    <Proxy balancer://redminecluster>
        BalancerMember http://127.0.0.1:3003
        BalancerMember http://127.0.0.1:3004
    </Proxy>
                                    
    Include "D:\Bitnami\redmine-4.2.3-0/apps/redmine-suiviprojets/conf/httpd-app.conf"
</VirtualHost>

<VirtualHost *:443>
    ServerName redmine.example.com
    ServerAlias www.redmine.example.com
    DocumentRoot "D:\Bitnami\redmine-4.2.3-0/apps/redmine-suiviprojets/htdocs/public"
    SSLEngine on
    SSLCertificateFile "D:\Bitnami\redmine-4.2.3-0/apps/redmine-suiviprojets/conf/certs/server.crt"
    SSLCertificateKeyFile "D:\Bitnami\redmine-4.2.3-0/apps/redmine-suiviprojets/conf/certs/server.key"
    <Directory "D:\Bitnami\redmine-4.2.3-0/apps/redmine-suiviprojets/htdocs/public">
        Options -MultiViews
        allow from all
    </Directory>

    RewriteEngine On
    RewriteRule ^/(.*)$ balancer://redminecluster%{REQUEST_URI} [P,QSA,L]
    <Proxy balancer://redminecluster>
        BalancerMember http://127.0.0.1:3003
        BalancerMember http://127.0.0.1:3004
    </Proxy>
                                    
    Include "D:\Bitnami\redmine-4.2.3-0/apps/redmine-suiviprojets/conf/httpd-app.conf"
</VirtualHost>

===================================================

In the Apache httpd.conf file, I have added:

	Alias /redmine/ "D:/Bitnami/redmine-4.2.3-0/apps/redmine/htdocs/public/"
    Alias /redmine "D:/Bitnami/redmine-4.2.3-0/apps/redmine/htdocs/public"

	Alias /suiviprojets/ "D:/Bitnami/redmine-4.2.3-0/apps/redmine-suiviprojets/htdocs/public/"
    Alias /suiviprojets "D:/Bitnami/redmine-4.2.3-0/apps/redmine-suiviprojets/htdocs/public"

The trouble, is that when I log on http://localhost:81/suiviprojets/ I reach the original redmine database
The links on the top of the page link to: http://localhost:81/redmine/projects
instead of http://localhost:81/suiviprojets/projects
(same with administration, my page, help etc…

And when I type the http://localhost:81/suiviprojets/projects url, I reach the redmine project, not the suiviprojets

Thank you by advance

Hi @denis.maillard ,

If this is the configuration file of the second redmine (you should have a conf file inside the redmine-suiviprojets folder), I’d remove the /redmine configuration lines from here and would also rename the name of the balancer (redminecluster) to avoid having problems with the balancer the first Redmine application is using.

Did you configure the second Redmine to use a different database? That’s something you have to change in the database configuration file.

Hello,

No problem to do so by doing the setup twice. (Get the Redmine files 2 times at different locations, configure 2 different databases).
You need to configure the web server to have different VirtualHosts or location for each instance.
To mention it, it seems the Redmine Ubuntu/Debian package has built-in support for multiple instances. I don’t have experience with that so don’t take my word for it.

Hi
Thank you for your answers (and patience!)
It is a total discovery of Redmine for me

The database.yml was changed:

production:
  adapter: mysql2
  database: suivi_projets
  host: 127.0.0.1
  username: bitnami
  password: XXXXXXXXXXXX
  # Use "utf8" instead of "utfmb4" for MySQL prior to 5.7.7
  encoding: utf8mb4
  port: 3306

The bitnami user had no access to this base, I’ve corrected it (and checked it)

http://localhost:81/suiviprojets/ still give me the desired page, but every links to http://localhost:81/redmine/
I am wondering about the 3306 port also used by the original database

for limbhaze, we are on windows, not ubuntu, thank you anyway

Hi @denis.maillard ,

if the database info was changed, I do not know what’s making the app to generate the links incorrectly. Could you please contact the Redmine’s support team to know more about this? Do not know if you need to change something in the database or in the configuration.

Hi
sorry for late answering
I will make a general check, maybe I’ve missed something
regards

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.