Bizarre HTML output with Jira behind Apache reverse proxy

After slamming my head on my desk for a day, I've given up and am asking:

Trying to get JIRA (for starters) to work through Apache mod_proxy with SSL.

Operating system is Centos 7.x, Apache HTTPD 2.4.x. All applications and httpd are on the same VM, but as I want to verify function with discrete boxes, I don't use localhost but servername throughout.

I have Let's Encrypt certificates installed and verified.DNS is working and can look up all hosts (plus backup entries in /etc/hosts)

JIRA responds to https://servername:9443 and works. Green lock in the address bar. HTTP is turned off.

As and aside all the other Atlassian server (Bamboo and Bitbucket) are set up similarly, with valid certs for HTTPS and HTTP turned off. Application links work cross-platform. All good.

I went and edited the context section in server.xml

<Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true">

   <Context docBase="${catalina.home}/atlassian-jira" path="/jira" reloadable="false" useHttpOnly="true">

      <Resource auth="Container" factory="org.objectweb.jotm.UserTransactionFactory" jotm.timeout="60" name="UserTransaction" type="javax.transaction.UserTransaction"/>

      <Manager pathname=""/>

   </Context>

</Host>

 

 With that I can now use https://servername:9443/jira.

My proxy server used most of the built-ins that HTTPD comes with on Centos 7.

My changes:

r-proxy.conf in /etc/httpd/conf.d

IfModule mod_proxy.c>
        SSLProxyEngine on

        ProxyRequests Off
        ProxyPreserveHost On

        <Proxy *>
                Require all granted
        </Proxy>

        ProxyPass /jira https://sername:9443/jira/
        ProxyPassReverse /jira https://servername:9443/jira/


        <Location /jira>
                Require all granted
        </Location>
</IfModule>


conf.d/ssl.conf (stripped down to active lines)

Listen 443 https
SSLPassPhraseDialog exec:/usr/libexec/httpd-ssl-pass-dialog
SSLSessionCache         shmcb:/run/httpd/sslcache(512000)
SSLSessionCacheTimeout  300
SSLRandomSeed startup file:/dev/urandom  256
SSLRandomSeed connect builtin
SSLCryptoDevice builtin
<VirtualHost _default_:443>
ServerName servername:443
ErrorLog logs/ssl_error_log
TransferLog logs/ssl_access_log
LogLevel warn
SSLEngine on
SSLProxyEngine on
SSLProtocol all -SSLv2
SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5:!SEED:!IDEA
SSLCertificateFile /etc/pki/serverdir/cert.pem
SSLCertificateKeyFile /etc/pki/serverdir/privkey.pem
SSLCertificateChainFile /etc/pki/serverdir/chain.pem
SSLCACertificateFile /etc/pki/serverdir/fullchain.pem
<Files ~ "\.(cgi|shtml|phtml|php3?)$">
    SSLOptions +StdEnvVars
</Files>
<Directory "/var/www/cgi-bin">
    SSLOptions +StdEnvVars
</Directory>
BrowserMatch "MSIE [2-5]" \
         nokeepalive ssl-unclean-shutdown \
         downgrade-1.0 force-response-1.0
CustomLog logs/ssl_request_log \
          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
</VirtualHost>

 

httpd runs with this and I can enter https://servername/jira which will direct to https://servername:9443/jira.

Now the Connector section of server.xml

<Connector
                SSLEnabled="true"
                acceptCount="100"
                clientAuth="false"
                connectionTimeout="20000"
                disableUploadTimeout="true"
                enableLookups="false"
                keyAlias="servername"
                keystoreFile="somedirsomewhere"
                keystorePass="mypass"
                keystoreType="JKS"
                maxHttpHeaderSize="8192"
                maxSpareThreads="75"
                maxThreads="150"
                minSpareThreads="25"
                port="9443"
                protocol="org.apache.coyote.http11.Http11Protocol"
                scheme="https"
                secure="true"
                sslProtocol="TLS"
                useBodyEncodingForURI="true"
                proxyName="servername" proxyPort="443"
        />

With all this, things seem to work, except for what I actually get. Essentially "raw" HTML with nothing else. I'm at a total loss and not enough of a webmaster to have the slightest idea whether I'm missing something (some plugin? module?)

This effect is on both IE and Firefox, so it's not some addon issue. And as I said without proxy, all works fine!

Dashboards


        Help
        
                            
                                                                
                                    JIRA Core help
                                

                                    Keyboard Shortcuts
                                

                                    About JIRA
                                

                                    JIRA Credits
                                



            Log In
                
  

    System Dashboard

 
ToolsView as Wallboard


Restore


        Atlassian JIRA Project Management Software

                                    
                        
        (v7.1.0#71003-sha1:2f3ef40)
    

        About JIRA
    

                        Report a problem
 
    Atlassian


This is utterly bizarre and I don't even know where to start! Following any of the links leads to the Atlassian skull&crossbones, btw. Even though the URLs look OK!

This is driving me to drink! Help!

1 answer

Oh well, found it: trailing slashes in r_proxy.conf

The bane of my existence:

 

ProxyPass /jira https://servername:9443/jira/
ProxyPassReverse /jira https://servername:9443/jira/
should simply be

 

ProxyPass /jira https://servername:9443/jira
ProxyPassReverse /jira https://servername:9443/jira

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted yesterday in Statuspage

How do your teams prepare for really high (planned) traffic days like Cyber Monday?

Hi there! Shannon from Statuspage here.  👋  With Cyber Monday quickly approaching, we're looking to hear from Atlassian customers – specifically from teams who touch incident response li...

43 views 0 4
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you