Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

JIRA no media and images after setting <contextpath>using Apache

Roman Lemtugov May 30, 2018

Installed on Centos 7 (LAMP)

After proxying server in accordance with this article https://confluence.atlassian.com/kb/proxying-atlassian-server-applications-with-apache-http-server-mod_proxy_http-806032611.html

my Jira opens by new address, but unfortunatelly without media, picture etc.

 

 

 

My connector and context path in server.xml 


...

<Connector port="8100" maxThreads="150" minSpareThreads="25" connectionTimeout="20000" enableLookups="false"
maxHttpHeaderSize="8192" protocol="HTTP/1.1" useBodyEncodingForURI="true" redirectPort="8443"
acceptCount="100" disableUploadTimeout="true" bindOnInit="false" scheme="http"
proxyName="******" proxyPort="80" />


...


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

<Resource name="UserTransaction" auth="Container" type="javax.transaction.UserTransaction"
factory="org.objectweb.jotm.UserTransactionFactory" jotm.timeout="60"/>
<Manager pathname=""/>
<JarScanner scanManifest="false"/>
</Context>

 

My virtualhost in /etc/httpd/conf.d/ 

 


<VirtualHost *:80>
ServerName *********

ProxyRequests Off
ProxyVia Off

<Proxy *>
Require all granted
</Proxy>

ProxyPass /jira ***********************
ProxyPassReverse ***********************
</VirtualHost>

 

Please advice what should be changed?

 

 

1 answer

1 accepted

0 votes
Answer accepted
Moses Thomas
Community Champion
May 30, 2018

@Roman Lemtugov

  • What  happens when  you  open in another browser?
  • Access Jira  without reverse proxy  what  happens?

 

Best!

Roman Lemtugov May 30, 2018

please delete this comment

Roman Lemtugov May 30, 2018

please delete this comment

Roman Lemtugov May 30, 2018

please delete this comment

Roman Lemtugov May 30, 2018

please delete this comment

 

Moses Thomas
Community Champion
May 30, 2018

@Roman Lemtugovcan you  add these comment also  and try again

<Proxy *>

Order deny,allow

Allow from all 

</Proxy>

Roman Lemtugov May 30, 2018

@Moses Thomas

Unfortunately, no positive effect. The same problem

Moses Thomas
Community Champion
May 30, 2018

@Roman LemtugovI think you  should consider using  nginx reverse proxy  server.

 

Best.

Roman Lemtugov May 30, 2018

@Moses Thomas

after connection AJP and adding RewriteRule and some experiments the problem is gone.

Final virtualhost looks like:

 

<VirtualHost *:80>
ServerName ************
ProxyRequests Off
ProxyVia Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>

RewriteEngine On
RewriteRule ^/jira(.*)$ ajp://***********:*******/jira$1 [P,L]
#RewriteCond %{HTTPS} off
#RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
ProxyRequests Off
ProxyPreserveHost Off
# ProxyPass /jira http://1*********100/jira/
# ProxyPassReverse /jira http://192*******00/jira/
ProxyPass /jira ajp://192*************/jira/
ProxyPassReverse /jira ajp://**********/jira/
ProxyPassReverseCookiePath /jira /
</VirtualHost>

 

Please help me understand how the problem was solved and why :)

Moses Thomas
Community Champion
May 31, 2018

@Roman Lemtugov for apache server we have two ways of Proxying Atlassian server applications with Apache server. One is 'mod_proxy_http' and second one is 'mod_proxy_ajp' protocol   so  you used the ajp  protocol, and i am happy that it works! :)

 

Best !

Suggest an answer

Log in or Sign up to answer