Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I want to run both on the same server(ubuntu linux) using the self contain jars (if that's what they are called) downloaded from jetbrains.com. I think they run some internal tomcat/catalina server using java.

I've been running these on different ports and used different hostnames to avoid session problems(since from what I understand sessions are bound to the hostname).

Both hostnames buildserver.local and youtrack.local points to the same ip address. But on different ports to define what server to respond to the request. This is causing a bit of trouble with out firefwall that only allows port 80 from outside the firewall.

Is there anyway to config these servers/services to respond based on hostname instead of port?

Also in the config file there's an attribute on the Connector node called "redirectPort" in server.xml. What does it do?

..fredrik

EDIT:

I made virtual host in apache to try to redirect to my internal addresses.

NameVirtualHost *:80

<VirtualHost *:80>
    ProxyPreserveHost On
    ProxyPass / http://youtrack.local:8080/
    ProxyPassReverse / http://youtrack.loca:8080/
    ServerName youtrack.local
    ServerAdmin youtrack@something.com
</VirtualHost>

But I get 403-error. And in the apache error log I get this:

client denied by server configuration: proxy:http://youtrack.local:8080/

It works when I'm on my local network at work or over VPN. So I think it's some where the apache config. Any ideas?

EDIT2:

Found the solution. In apache2/mods-enable/proxy.conf one need to change in the section to this:

<Proxy *>
            AddDefaultCharset off
            Order deny,allow
            Deny from all
            Allow from all
    </Proxy>

Warning: This will allow every request to be passed over the proxy. You might want to check in to mod_access to restrict access.

share|improve this question

2 Answers 2

up vote 3 down vote accepted

I don't know if there's something you can do within Tomcat to listen for HTTP host headers, but if you install Apache, have it listen on port 80, and depending on the HTTP host that's requested (virtualdir) have it do a Proxy connection back to the tomcat instance on their respective ports.

share|improve this answer
    
Thanks. Not sure how to do that. Updated my question with what I did and the error I get. –  fredrik Dec 15 '10 at 17:25
    
Found the solution. Thanks again. –  fredrik Dec 15 '10 at 17:58

TeamCity in tar.gz contains Tomcat. YouTrack in .jar edition includes Jetty. We have a short guide on how to setup TeamCity and YouTrack to run on the same server.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.