Mobile app version of vmapp.org
Login or Join
Karen161

: Proxying is removing the end of the URL I have an existing apache webserver, and I am trying to add YouTrack to it. Knowing anything about YouTrack is likely not relevant for this question,

@Karen161

Posted in: #Apache #Proxy

I have an existing apache webserver, and I am trying to add YouTrack to it. Knowing anything about YouTrack is likely not relevant for this question, except that it's running Jetty 6.1.

So I have it working correctly on it's port. Note, the domain and all the DNS is done internally, the webserver is not exposed to the main internet. If I browse to:
my.web.site:7935/

Everything works perfectly, and the connection doesn't go through apache at all. I am trying to use mod_proxy to be able to browse, and I get redirected.
my.web.site/youtrack/ --> my.web.site/rootGo

Which is not found on my server (obviously); rootGo is related to youtrack. If I manually type in the correct url, this gets redirected:
my.web.site/youtrack/rootGo/ --> my.web.site/youtrack/login

Which shows a login box but it can't seem to find any of the CSS or other helper files.

Here's what I added to my existing <VirtualHost *:80>. Note: nothing else on this webserver is using mod_proxy:

ProxyRequests Off
ProxyVia On
ProxyPreserveHost On

# Set the permissions for the proxy
<Proxy *>
Order deny,allow
Allow from all
</Proxy>

ProxyPass /youtrack/ my.web.site:7935/ ProxyPassReverse /youtrack/ my.web.site:7935/
<Location /youtrack>
Order allow,deny
Allow from all
</Location>


Is this a problem with my configuration or with YouTrack? I tried to follow the instructions on the YouTrack website but they're pretty minimal and just refer me to the Jetty documentation which hasn't been super helpful either.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Karen161

1 Comments

Sorted by latest first Latest Oldest Best

 

@Sent6035632

Using the Standalone version for Youtrack (comes with Tomcat) and Apache, i've succeeded serving Youtrack from a subdirectory (/youtrack) with the following steps:


Stop the Youtrack service if it's running
Enable the AJP connector by uncommenting the following line in server.xml if it is commented (default: enabled)

<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />

Rename the webapps/ROOT directory to webapps/youtrack
Start Youtrack
Login to Youtrack using the address
my.web.site:7935/
Change the URL in your Youtrack settings to
my.web.site/youtrack
Stop Apache
Edit httpd.conf and add the following lines:

ProxyRequests Off
ProxyPreserveHost On

ProxyPass /youtrack ajp://my.web.site:8009/youtrack
ProxyPassReverse /youtrack ajp://my.web.site:8009/youtrack

Start Apache


Now you should be able to reach Youtrack from

my.web.site/youtrack

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme