Skip to content
Merged
Show file tree
Hide file tree
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
14 changes: 13 additions & 1 deletion modules/ocf_www/files/vhost-web-nginx.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,18 @@ server {
location / {
{% if vhost.is_redirect %}
return {{vhost.redirect_type}} {{vhost.redirect_dest}}$request_uri;
{% elif vhost.is_apphost and vhost.disabled %}
proxy_pass http://127.0.0.1:{{backend_port}};
proxy_set_header Host unavailable.ocf.berkeley.edu;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
{% elif vhost.is_apphost %}
proxy_pass https://apphost.ocf.berkeley.edu;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
{% else %}
proxy_pass http://127.0.0.1:{{backend_port}};
proxy_set_header Host $host;
Expand All @@ -40,7 +52,7 @@ server {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://127.0.0.1:{{backend_port}};
proxy_pass https://apphost.ocf.berkeley.edu;
}
{% endfor %}

Expand Down
5 changes: 0 additions & 5 deletions modules/ocf_www/manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,8 @@
backport_on => 'stretch';
}

# Apache no longer serves SSL directly (nginx handles it), but mod_ssl is
# still needed for SSLProxyEngine (outbound HTTPS to apphost).
include apache::mod::ssl

include ocf_www::lets_encrypt
include ocf_www::logging
include ocf_www::ssl

# sites
include ocf_www::site::ocfweb_redirects
Expand Down