Apache proxy

Youtrack is running as standalone app on port 8112.

I`m trying to create url that points to it using Apache Web Server.

The url is https://dev.site.com/youtrack. I`ve installed mod_proxy, mod_proxy_http and configured them like this:

ProxyRequests Off

ProxyPass /youtrack http://localhost:8112

ProxyPassReverse /youtrack http://localhost:8112

But when I`m trying to open https://dev.site.com/youtrack in my browser, I`m redirected to http://dev.site.com/rootGo with error 404.


Is there some way telling youtrack on what domain it`s running or how should I change my config to make it work?

8 comments
Comment actions Permalink

Are you using a rather standard Apache 2 setup with sites-available and sites-enabled?

In your /etc/apache2/sites-available/youtrack file  you should have:

ProxyPass     /YouTrack     http://localhost:8080/YouTrack

That should do it really... Don't forget to link to /etc/apache2/sites-available/youtrack from /etc/apache2/sites-enabled/

Greeting,

Jeroen.

0
Comment actions Permalink

Yeah, I`ve already done all that.

0
Comment actions Permalink

Hello Paul,

Here's working config from Apache which is working perfectly for us:

ProxyPass /   http://172.26.240.14:8080/
ProxyPassReverse / http://172.26.240.14:8080/
ProxyTimeout 120

NOTE: We're mapping ROOT uri of Apache to the ROOT uri of Youtrack. I'm not sure that it works with different uri between Apache and Youtrack.

Thanks,

Sergey

0
Comment actions Permalink

The root URI works for me, but I`d like to make it work in non-root URIs also.

0
Comment actions Permalink

I think it should work for same URIs, so if you deploy Youtrack under /youtrack uri, you can proxy it under Apache's /youtrack uri. But as I know it's possible only in WAR version of Youtrack, not standalone.

Maybe developers of Youtrack corrects me.

Thanks,

Sergey

0
Comment actions Permalink

I have the same problem but in my case even proxy  / (ROOT) does not work. I use apache2 and have setup an SSL enabled virtual host.

In the host config I have:

ProxyPass / http://192.168.11.49:8112

ProxyPassReverse / http://192.168.11.49:8112

After calling the ssl enabled host with https://<ip-address-of-ssl-host> the browser wants to call http://<ip-address-of-ssl-host>/rootGo

I have found this: http://youtrack.jetbrains.net/issue/JT-3377

Does this solve the problem?

Thanks Roland

0
Comment actions Permalink

The way telling youtrack on what domain it`s running is "Base URL" in settings. Seems that you have to change your Base URL from http://dev.site.com/ to https://dev.site.com/youtrack

0
Comment actions Permalink

For future references, if you hit the same problem like me, put the rewrite directive as below

<VirtualHost *:80>

ServerName  (virtualhost.example.com)

RewriteEngine on

RewriteRule ^(.+)$ https://(virtualhost.example.com)/$1 [L]

</VirtualHost>

Of course, you need to add 'LoadModule rewrite_module $(APPACHE_INSTALL_PATH)/modules/mod_rewrite.so" in httpd.conf
0

Please sign in to leave a comment.