HowTo run multiple Redmine instances on Apache with different ports and proxy them out with ssl??
Added by Martin P. over 9 years ago
Hi folks, i kindly need your assistance after i searched and tried different HowTo and forum pages here and also included a global search.
Puropse/Goal:¶
Run multiple Redmine instances on my local linux server and proxy each of them on a different port out.
Setup:¶
Installed Redmine with standard board resources (meaning we're using fcgi no additionals like mongrel) and Apache setup.
OS: ¶
SuSe Linux 3.16.7-24 X86_64 GNU/Linux
Environment:¶
Redmine version 3.2.0 (stable)
Ruby version 2.1.3-p242 (2014-09-19) [x86_64-linux-gnu]
Rails version 4.2.5
Environment production_customer1
Database adapter Mysql2
SCM:¶
Subversion 1.8.14
Redmine plugins:¶
no plugin installed
Configs:¶
Main internal Apache:
<VirtualHost>
LISTEN *:3001
#@Port=3001; @Customer=customer1; # proxy <VirtualHost *:3001> <VirtualHost redmine.mydomain.tdl>
#register DNS alias
ServerName redmine.mydomain.tdl
ServerAdmin webmaster@mydomain.tdl
DocumentRoot /usr/local/redmine-3.2.0/public/
#set environemnt variables:
FcgidInitialEnv RAILS_ENV "production_customer1"
#custum logs
ErrorLog /var/log/apache2/redmine_error_log
CustomLog /var/log/apache2/redmine_access_log combined
#allows to upload files up to 20 mb
MaxRequestLen 20971520
<Directory "/usr/local/redmine-3.2.0/public/">
#for using fcig-Proxy:
AddHandler fcgid-script fcgi
Require all granted
AllowOverride all
Options +FollowSymLinks +ExecCGI
RewriteEngine On
#rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
</Directory>
</VirtualHost>
#different tries to configure the relative URL
additional_environment.rb: #different try herer -> also doesn't work config.relative_url_root = '/try2'
application.rb:# config.action_controller.relative_url_root = '/try2'
application.rb:# config.relative_url_root = '/try2'
environment.rb:#new try Redmine::Utils::relative_url_root = "/redmine"
environment.rb:#another try Redmine::Utils::relative_url_root = "/try2"
environment.rb:#yet another config.action_controller.relative_url_root = '/try2'
On Proxy-Apache - different machine - maybe an external one with/without ssl
RewriteEngine On
ServerAdmin user@mydomain.tdl
ServerName host2.mydomain.tdl
ErrorLog /var/log/apache2/redmine_proxy-error_log
CustomLog /var/log/apache2/redmine_proxy-access_log combined
SSLProxyEngine On
#doesn't work with ports
# ProxyPass / http://host1.mydomain.tdl:3000/
# ProxyPassReverse / http://host1.mydomain.tdl:3000/
# ProxyPassReverseCookiePath http://host1.mydomain.tdl/ *:22100/
#
# ProxyPass /try2/ http://redmine.mydomain.tdl/try2/
# ProxyPassReverse /try2/ http://redmine.mydomain.tdl:/try2/
ProxyPass /try2/ http://redmine.mydomain.tdl/
ProxyPassReverse /try2/ http://redmine.mydomain.tdl:/
# ProxyPassReverseCookiePath / /
Issues:¶
Whether the links does not work because of internal static paths/routing or the css is not loaded or the page does not load at all.
What am i missing so i can reach my goal of running and proxying multiple Redmine instances on one machine??
Can you please give me an complete overwith maybe with example configurations so i can set up multiple Redmine instances on different ports and tunnel them securely with ssl through an proxy on an apache host out?
Thanks a lot in advance for your help!!
Cheers!
Replies (1)
RE: HowTo run multiple Redmine instances on different ports and proxy them out with ssl??
-
Added by Pavel Potcheptsov over 9 years ago
nginx+unicorn works well for several instances.
Define different sockets in unicorn for each redmine and proxy each redmine to that sockets in nginx.
Setup ssl in nginx and force redirection to https.
That's it.