0

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.

Joel Coel
  • 12,932
  • 14
  • 62
  • 100
sunny1
  • 33
  • 3
  • What version of JIRA are you installing? 4.4.x or 5.0 Beta? – iainlbc Oct 27 '11 at 01:52
  • Its 4.4.3 on Debian 5 Linux. – sunny1 Oct 27 '11 at 07: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

2 Answers2

1

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;
    }
}
Joel Coel
  • 12,932
  • 14
  • 62
  • 100
Allan Jude
  • 1,286
  • 9
  • 13
0

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">
Joel Coel
  • 12,932
  • 14
  • 62
  • 100
iainlbc
  • 2,694
  • 19
  • 19
  • 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 http://1.2.3.4:8080/jira Here is the line: – sunny1 Oct 28 '11 at 01:05
  • 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 05: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