I am trying to run Jira locally via atlas-run/atlas-debug and expose it via ngrok to the internet (HTTPS). If I just do atlas-run I get a bunch of [c.a.p.r.c.security.jersey.XsrfResourceFilter] Additional XSRF checks failed for request logs which, as far as I understand, are an effect of Tomcat not knowing about the ngrok proxy.
Basically, I want this, where Apache is ngrok proxy:
How can I configure connector in server.xml for atlas-run?
Tried to configure default connector in target/container/tomcat8x/cargo-jira-home/conf/server.xml to add proxyName and proxyPort and change scheme to https. The problem here is that this config gets overridden with the default connector when I do atlas-run/atlas-debug.
Any help/hints or links to some secret hidden docs or community post that I didn’t manage to google yet would be appreciated.
Does anyone know how to configure AMPS to set proxyName, proxyPort and scheme for the Tomcat container?
If I change the server.xml in target/container/tomcat8x/cargo-jira-home/conf/server.xml it gets reset to the standard config as soon as I do atlas-run/atlas-debug/atlas-run-standalone.
I managed to change the connector easily for a standard Jira installation (not started via AMPS, download purchased Jira app and start it) with the following config:
As far as I know, you can’t run atlas-debug behind a proxy. Deep down it uses Codehaus Cargo - Home so you might be able to get some info there and see if they have options (but I didn’t see any.)
However, what I do is use a regular Confluence or Jira install and adjust the server.xml to appear like you’re using atlas-debug. You would add proxyName and proxyPort as well.
So, what I do is
Update conf/server.xml to have the Connector with port="1990" or port="2990"
Update Context to have path="/confluence" or path="/jira"
For Confluence add CATALINA_OPS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5004 ${CATALINA_OPTS} or for Jira JVM_SUPPORT_RECOMMENDED_ARGS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005" to bin/setenv.sh
Then I run Confluence/Jira with bin/start-(confluence|jira).sh.
I can deploy the add-on with atlas-install-plugin. The thing you lose is the automatic install when rebuilding. But you do gain the ability to use a normal database, and make it persist between restarts.
Hi after struggling with this I’ve found a simple solution.
You can add the proxyName and proxyPort attributes to the Connector in the file “target/container/tomcat9x/apache-tomcat-9.0.65/conf/server.xml” instead. Add it to the connector with port 8080:
Atlas-run will take that connector and change the port to 1990 and make other changes but that way you can set the proxyName and proxyPort without a hassle for testing. The only issue is you can’t set the secure parameter because that will be overridden.
To get secure=“true” you can enable https in the pom.xml by doing the following: