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.

Forgive my ignorance, but I'm setting up Jira on a linux system that's running apache and has several VirtualHost configurations, each responding to a unique IP address. For example, www.mysite.com is 1.2.3.4, and www.myothersite.com is 5.6.7.8.

I've got Jira running and it responds to www.mysite.com:8080, but it ALSO responds to every other address on the server -- www.myothersite.com:8080. I only want mysite.com:8080 to work and myothersite.com:8080 to fail. Any ideas?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

The solution should be to just modify your VirtualHost block for Jira from:

<VirtualHost *:8080>

to:

<VirtualHost 1.2.3.4:8080>

But, since it's a port 8080 listener, are you sure it's not just a straight Tomcat listener, skipping Apache completely?

share|improve this answer
    
I'm not sure - it could be that Tomcat is causing apache to skip it entirely. There's no *:8080 in my apache conf. –  jtalarico Mar 8 '11 at 4:03
2  
@jtalarico: in that case, you're doing it wrong. :) You want apache to act as a proxy talking to tomcat as a backend, and not expose tomcat to the world. (Have tomcat bind to localhost.) –  mattdm Mar 8 '11 at 4:05

I'm not sure this is the best way to do it, but I looked at the Tomcat server.xml file and saw that I could add an address attribute to the Connector node that set up port 8080. By doing this, it ONLY responds to requests on port 8080 for that address and none of the other IP addresses set up on the 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.