Skip to content

Commit

Permalink
Merge pull request #51 from peculater/ajp-in-server-xml
Browse files Browse the repository at this point in the history
Turn on the AJP connector based on a hiera or puppet-variable lookup
  • Loading branch information
mkrakowitzer committed Jan 30, 2015
2 parents d865960 + 1d32249 commit bfdde97
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
8 changes: 8 additions & 0 deletions jira.yaml
Expand Up @@ -104,5 +104,13 @@ jira::proxy:
scheme: 'https'
proxyName: 'www.exmaple.co.za'
proxyPort: '443'
# Configure AJP port
jira::ajp:
port: '8009'
redirectPort: '8443'
protocol: 'AJP/1.3'

# Optionally, configure AJP parameters the same way you do jira::proxy above

# Configure path attribute for the <Context>
jira::contextpath: '/jira'
2 changes: 2 additions & 0 deletions manifests/init.pp
Expand Up @@ -111,6 +111,8 @@

# Reverse https proxy
$proxy = {},
# Options for the AJP connector
$ajp = {},
# Context path (usualy used in combination with a reverse proxy)
$contextpath = '',

Expand Down
12 changes: 8 additions & 4 deletions templates/server.xml.erb
Expand Up @@ -112,10 +112,14 @@
====================================================================================
-->

<!--
<Connector port="8009" redirectPort="8443" enableLookups="false" protocol="AJP/1.3" URIEncoding="UTF-8"/>
-->

<% if @ajp -%>
<Connector enableLookups="false" URIEncoding="UTF-8"
<% @ajp.sort.each do |key,value| -%>
<%= key %> = <%= "\'#{value}\'" %>
<% end -%>
<% end -%>
/>

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

Expand Down

0 comments on commit bfdde97

Please sign in to comment.