Guest's picture

Hi all and thanks a lot for your work. I m a french user so sory for my bad english :(

I have a problem using redmine and proxypass. Here is the problem:

I have a front server with apache that is used on internet.
I have a second server with redmine ( Turnket 11.1) used on intranet.
I want to add a proxypass on my internet server tu use a conection to my redmine server from internet. I already use this for my knowledgetree server and it works.
So on my main apache server i add that:
#These lines are for knowledgetree and works
ProxyPass /ktdms http://192.X.X.X/ktdms
ProxyPassReverse /ktdms http://192.X.X.X/ktdms
#These lines are for redmine and dont works :(
ProxyPass /projets http://192.X.X.Y:80
ProxyPassReverse /projets http://192.X.X.Y:80



Can you help me?



Jeremy Davis's picture

But I'd try without the port eg

#These lines are for redmine and dont works :(
ProxyPass /projets http://192.X.X.Y/
ProxyPassReverse /projets http://192.X.X.Y/

But I'm only guessing...

Archimedes Trajano's picture

Trying to do it with mine except I need the port since it is on the same server

ProxyPass /jenkins http://localhost:8081
ProxyPassReverse /jenkins http://localhost:8081

Perhaps I am editing the wrong configuration, but I am not sure exactly which one I should modify.

Archimedes Trajano's picture

This is specific for Jenkins, but the idea can apply to any others.  You need to modify the sites-available/railsapp configuration and put the following

RewriteEngine On
# Use last flag because no more rewrite can be applied after proxy pass
RewriteRule       ^/jenkins(.*)$  http://localhost:8081/jenkins$1 [P,L]
ProxyPassReverse  /jenkins        http://localhost:8081/jenkins
ProxyRequests     Off

# Local reverse proxy authorization override
# Most unix distribution deny proxy by default (ie /etc/apache2/mods-enabled/proxy.conf in Ubuntu)
<Proxy http://localhost:8081/jenkins*>
  Order deny,allow
  Allow from all

    UseCanonicalName Off
    Include /etc/apache2/conf/railsapp.conf

The problem is there's an extra rewrite rule to handle caching for the rails app which seems to break things.

Add new comment