apache-frontend: Allow to use diferent backends for http and https
Use 2 different ports on apache for cached slaves, to differ http and https accesses. Introduce the parameter https-url (with fallback to url) to include specific https urls, if they are different from url. Include /HTTPS/ mapping to traffic server to differ the backends based on the input.
... | ... | @@ -23,6 +23,7 @@ parts = |
promise-apache-frontend-v6-https | ||
promise-apache-frontend-v6-http | ||
promise-apache-cached | ||
promise-apache-ssl-cached | ||
trafficserver-launcher | ||
trafficserver-reload | ||
... | ... | @@ -144,6 +145,7 @@ extra-context = |
key apache_configuration_directory apache-directory:slave-configuration | ||
key apache_cached_configuration_directory apache-directory:slave-with-cache-configuration | ||
key cached_port apache-configuration:cache-through-port | ||
key ssl_cached_port apache-configuration:ssl-cache-through-port | ||
key http_port instance-parameter:configuration.plain_http_port | ||
key https_port instance-parameter:configuration.port | ||
key public_ipv4 instance-parameter:configuration.public-ipv4 | ||
... | ... | @@ -225,6 +227,7 @@ extra-context = |
key instance_home buildout:directory | ||
key ipv4_addr instance-parameter:ipv4-random | ||
key cached_port apache-configuration:cache-through-port | ||
key ssl_cached_port apache-configuration:ssl-cache-through-port | ||
key server_admin instance-parameter:configuration.server-admin | ||
key protected_path apache-configuration:protected-path | ||
key access_control_string apache-configuration:access-control-string | ||
... | ... | @@ -284,6 +287,7 @@ cache-pid-file = $${directory:run}/httpd-cached.pid |
# Comunication with ats | ||
cache-port = $${trafficserver-variable:input-port} | ||
cache-through-port = 26011 | ||
ssl-cache-through-port = 26012 | ||
# Create wrapper for "apachectl conftest" in bin | ||
[configtest] | ||
... | ... | @@ -405,7 +409,9 @@ reload-path = $${directory:etc-run}/trafficserver-reload |
local-ip = $${instance-parameter:ipv4-random} | ||
input-port = 23432 | ||
hostname = $${instance-parameter:configuration.frontend-name} | ||
remap = map / http://$${instance-parameter:ipv4-random}:$${apache-configuration:cache-through-port} | ||
remap = map /HTTPS/ http://$${instance-parameter:ipv4-random}:$${apache-configuration:ssl-cache-through-port} | ||
map / http://$${instance-parameter:ipv4-random}:$${apache-configuration:cache-through-port} | ||
|
||
plugin-config = ${trafficserver:location}/libexec/trafficserver/rfc5861.so | ||
cache-path = $${trafficserver-directory:cache-path} | ||
disk-cache-size = $${instance-parameter:configuration.disk-cache-size} | ||
... | ... | @@ -535,6 +541,12 @@ path = $${directory:promise}/apache_cached |
hostname = $${instance-parameter:ipv4-random} | ||
port = $${apache-configuration:cache-through-port} | ||
[promise-apache-ssl-cached] | ||
recipe = slapos.cookbook:check_port_listening | ||
path = $${directory:promise}/apache_ssl_cached | ||
hostname = $${instance-parameter:ipv4-random} | ||
port = $${apache-configuration:ssl-cache-through-port} | ||
[slap_connection] | ||
# Kept for backward compatiblity | ||
computer_id = $${slap-connection:computer-id} | ||
... | ... |