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

I have Remote Debian linux server which i access using Putty console either by IP or domain. That means server IP is pointing to hostname already for example:

1.2.3.4 -> projects.example.com

I have installed Application called JIRA on remote server which is Apache based i guess. and i can access its website using 1.2.3.4:8080 I want to link this to projects.example.com/jira

How can i do that? Any details with tutorial link will ofcourse help.

share|improve this question
    
What version of JIRA are you installing? 4.4.x or 5.0 Beta? –  iainlbc Oct 27 '11 at 1:52
    
Its 4.4.3 on Debian 5 Linux. –  sunny1 Oct 27 '11 at 7:36
1  
I don't know where mysite.com points for you, but where I'm at it's blocked because our system lists it as spyware. In the future, please use the name "example" for this kind of thing, as it's specifically reserved for that purpose. –  Joel Coel Oct 27 '11 at 18:40
add comment

2 Answers

up vote 0 down vote accepted

JIRA runs as a standalone tomcat container out of the box. You can easily proxy to it from apache, I've only configured it as a separate subdomain and not a subdirectory of a site (ie. jira.mysite.com vs. projects.example.com/jira.

This is the tutorial I used to setup our apache => Jira config using mod_proxy: http://confluence.atlassian.com/display/JIRA044/Integrating+JIRA+with+Apache

To run it on a subdirectory like /jira, It may be as simple as doing this in your vhost:

ProxyPass /jira http://localhost:1080/
ProxyPassReverse /jira http://localhost:1080/

And setting the context path in conf/server.xml:

<Context path="/jira" docBase="${catalina.home}/atlassian-jira" reloadable="false">
share|improve this answer
    
Do i have to install Tomcat server other then standalone jira already running? I tried to configure context path /opt/atlassian/jira/conf/server.xml on server like it shows on documentation, but unfortunately the server is not accessing jira from 1.2.3.4:8080/jira Here is the line: <Context path="/jira" docBase="${catalina.home}/atlassian-jira" reloadable="false"> –  sunny1 Oct 28 '11 at 1:05
    
Thanks its solved –  sunny1 Oct 28 '11 at 5:25
    
One last question: How to set my domain projects.example.com/jira instead of 1.2.3.4/jira ? If website is already pointing to that will it work? Or there's any configuration? –  sunny1 Oct 28 '11 at 5:28
    
Hi sunny, You won't need any additional config on the JIRA side of things. Just an A record with your domains DNS provider pointing to the server's IP and the ServerName attribute set in your vhost –  iainlbc Oct 28 '11 at 18:39
add comment

You could also do this with NGINX if you only want to do this simple proxy without running a full web server.

server {
    listen 80 default;
    servername projects.example.com _;

    location /jira {
        rewrite ^/jira(.*)$ $1 break;
        proxy_pass http://1.2.3.4:8080;
        proxy_pass_request_headers      on;
        proxy_set_header                Host            $http_host;
        proxy_set_header                X-Forwarded-For $remote_addr;
    }
}
share|improve this answer
add comment

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.