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

Redirect HTTP to HTTPS #137

Merged
merged 1 commit into from
Feb 13, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions templates/default/web_app.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,9 @@
ErrorLog <%= node['stash']['apache2']['error_log'].empty? ? node['apache']['log_dir']+"/stash-error.log" : node['stash']['apache2']['error_log'] %>
LogLevel warn

<Proxy *>
<% if node['apache'] && node['apache']['version'] == '2.4' %>
Require all granted
<% else %>
Order Deny,Allow
Allow from all
<% end %>
</Proxy>
ProxyPass / http://localhost:<%= node['stash']['tomcat']['port'] %>/ connectiontimeout=5 timeout=300
ProxyPassReverse / http://localhost:<%= node['stash']['tomcat']['port'] %>/
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
</VirtualHost>

<VirtualHost *:<%= node['stash']['apache2']['ssl']['port'] %>>
Expand Down