Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: Adjusting Server.xml With Envs #12

Closed
blacklabelops opened this issue Feb 26, 2017 · 14 comments
Closed

Proposal: Adjusting Server.xml With Envs #12

blacklabelops opened this issue Feb 26, 2017 · 14 comments
Labels

Comments

@blacklabelops
Copy link
Member

blacklabelops commented Feb 26, 2017

You can vote for this feature. Do you need this?

Adjusting the server.xml connector attributes with envs.

Example:

$ docker run -d -p 80:8090 -p 8091:8091 \
    --name jira \
    -e "JIRA_CONNECTOR_PROPERTY1=proxyPort" \
    -e "JIRA_CONNECTOR_VALUE1=80" \
    -e "JIRA_CONNECTOR_PROPERTY2=proxyName" \
    -e "JIRA_CONNECTOR_VALUE2=confluence.example.org" \
    blacklabelops/jira
@EugenMayer
Copy link
Contributor

did i create a dupe for this ? #27 seems like you are aiming for the exact same thing here, right?

@blacklabelops
Copy link
Member Author

You can see it both ways. #27 is an enhancement of this but this won't fix #27. We will close #27 and pursue the issue here.

@EugenMayer
Copy link
Contributor

@blacklabelops just tried that, and yes, you are forced to have several connectors when you deal with the case of service-desk / jira having different domains. If you dont, jira-servicedesk will through an json error .. but it seems far more complicated then we thought yet: https://confluence.atlassian.com/jirakb/how-to-customize-customer-portal-url-in-jira-service-desk-server-847755218.html

@blacklabelops
Copy link
Member Author

blacklabelops commented May 21, 2017

That article means that due to Tomcat 8.0 you will have to use rewrite rules rather than multiple connectors in order to support multiple domains or subdomains.

@blacklabelops
Copy link
Member Author

I am not really sure if a redirect is the thing you want.

If I understand the article correctly you will be send for example from support.domain.com to jira.domain.com.

Didn't you want to serve all requests and responses under support.domain.com? A simple redirect can be realized with simpler means than redirect rules inside Tomcat.

@EugenMayer
Copy link
Contributor

That's what I just did 1hour ago, anything else is just not worth the effort. Seeing the effort needed, i would not expect you to do anything for multi domain support.. way too complex

@blacklabelops
Copy link
Member Author

So in the end what do you need? You can simply use a nginx or haproxy for redirection rules and URL rewriting. No need to configure Tomcat.

@EugenMayer
Copy link
Contributor

Of course, I even used a cloudflare based redirect, no need to introduce nginx into this stack for now

@blacklabelops
Copy link
Member Author

blacklabelops commented May 21, 2017

Example for multi-domain-connector approach:

$ docker run -d -p 8090:8090 -p 8091:8091 \
    --name jira \
    -e "JIRA_CONNECTOR1_PROPERTY1=proxyPort" \
    -e "JIRA_CONNECTOR1_VALUE1=80" \
    -e "JIRA_CONNECTOR1_PROPERTY2=proxyName" \
    -e "JIRA_CONNECTOR1_VALUE2=support.example.org" \
    -e "JIRA_CONNECTOR1_PROPERTY3=port" \
    -e "JIRA_CONNECTOR1_VALUE3=8090" \
    -e "JIRA_CONNECTOR2_PROPERTY1=proxyPort" \
    -e "JIRA_CONNECTOR2_VALUE1=80" \
    -e "JIRA_CONNECTOR2_PROPERTY2=proxyName" \
    -e "JIRA_CONNECTOR2_VALUE2=jira.example.org" \
    -e "JIRA_CONNECTOR2_PROPERTY3=port" \
    -e "JIRA_CONNECTOR2_VALUE3=8091" \
    blacklabelops/jira

Can anybody confirm that this Jira instance would serve requests and response with both domains?

@blacklabelops
Copy link
Member Author

Reverse proxy example with nginx:

$ docker run -d \
    -p 80:80 \
    --name nginx \
    -e "SERVER1SERVER_NAME=support.example.org" \
    -e "SERVER1REVERSE_PROXY_LOCATION1=/" \
    -e "SERVER1REVERSE_PROXY_PASS1=http://jira:8090" \
    -e "SERVER2SERVER_NAME=jira.example.org" \
    -e "SERVER2REVERSE_PROXY_LOCATION1=/" \
    -e "SERVER2REVERSE_PROXY_PASS1=http://jira:8091" \
    blacklabelops/nginx

@blacklabelops
Copy link
Member Author

Tested it locally and it works:

<Connector
        port="8080"
        maxThreads="150"
        minSpareThreads="25"
        connectionTimeout="20000"
        enableLookups="false"
        maxHttpHeaderSize="8192"
        protocol="HTTP/1.1"
        useBodyEncodingForURI="true"
        redirectPort="8443"
        acceptCount="100"
        disableUploadTimeout="true"
        bindOnInit="false"
        proxyPort="80"
        proxyName="crowd.yourhost.com"
    />

    <Connector
        port="8090"
        maxThreads="150"
        minSpareThreads="25"
        connectionTimeout="20000"
        enableLookups="false"
        maxHttpHeaderSize="8192"
        protocol="HTTP/1.1"
        useBodyEncodingForURI="true"
        redirectPort="8443"
        acceptCount="100"
        disableUploadTimeout="true"
        bindOnInit="false"
        proxyPort="80"
        proxyName="jira.yourhost.com"
    />

@blacklabelops
Copy link
Member Author

Update: Does not really work. Jira notifies a configuration error when accessing the url that is not registered as the base url. Also when you press the Jira logo your always redirected to the base url.

I am assuming that there are more issues and Jira is not able to run under multiple base urls. So the multi-domain multi-connector feature is off the table!

@EugenMayer
Copy link
Contributor

seconding this, i ditched it on my side. It works limited to service-desk but its far not worth the effort on not well supported my atlassian either way

@blacklabelops
Copy link
Member Author

I'll ditch this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants