Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Allow disabling of SSL #56

Closed
wants to merge 5 commits into from
Closed

Allow disabling of SSL #56

wants to merge 5 commits into from

Conversation

sunruh
Copy link

@sunruh sunruh commented Jan 23, 2015

Allows to disable to the SSL configuration of Tomcat and Apache by setting the port attributes to -1.

It is a replacement for PR #22 with the difference, that a34d15d (add proxy preserve host) has not been applied as it is unrelated to SSL (but important nevertheless).

@bflad
Copy link
Owner

bflad commented Jan 24, 2015

Overall looks good -- would it be cleaner just to accept false instead of comparing to -1 everywhere?

@bflad
Copy link
Owner

bflad commented Jan 24, 2015

Reasoning is that you can change all those unless node['stash']['tomcat']['ssl_port'] == -1 to if node['stash']['tomcat']['ssl_port'] which is a little easier to read personally.

@sunruh
Copy link
Author

sunruh commented Feb 2, 2015

Changed the if statements to check for false status instead of comparing to -1 and rebased on top of current master.

@linc01n
Copy link
Collaborator

linc01n commented Feb 10, 2015

Hi @sunruh,

Thanks for your contribution. Sorry for the late review since I was having problem on testing your pull request(#69)

I tried to use your PR to deploy the cookbook. But I am redirected to the https site. It is caused by this line of code https://github.com/humance/chef-stash-cookbook/blob/2ec8709c3c75b2078f73e13202ea31711e52ef69/templates/default/server-tomcat8.xml.erb#L80

You need to change it

--- a/templates/default/server-tomcat8.xml.erb
+++ b/templates/default/server-tomcat8.xml.erb
@@ -77,7 +77,7 @@
                    useBodyEncodingForURI="true"
                    compression="on"
                    compressableMimeType="text/html,text/xml,text/plain,text/css,application/json,application/javascript,application/x-javascript"
-                   <% if node['stash']['apache2'] -%>
+                   <% if node['stash']['apache2'] && node['stash']['tomcat']['ssl_port'] -%>
                    redirectPort="<%= node['stash']['apache2']['ssl']['port'] %>"
                    secure="true"
                    scheme="https"

@linc01n
Copy link
Collaborator

linc01n commented Feb 13, 2015

It may also affect this default

default['stash']['backup_client']['baseurl']      = "https://#{node['fqdn']}/"

default['stash']['backup_client']['baseurl'] = "https://#{node['fqdn']}/"

@linc01n linc01n added this to the 4.x milestone Jun 30, 2015
@ramonskie
Copy link
Contributor

any update on this?
because without disabling ssl
can't seem to get test-kitchen to run on ubuntu

@ramonskie
Copy link
Contributor

bump

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants