Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added support for http/2 #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
3 changes: 2 additions & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ nginx_drupal_use_boost: false
nginx_drupal_use_drush: true
nginx_drupal_allow_install: false
nginx_drupal_use_spdy: false
nginx_drupal_use_http2: false
nginx_drupal_php_fpm_status_allowed_hosts: ["127.0.0.1", "192.168.1.0/24"]
nginx_drupal_nginx_status_allowed_hosts: ["127.0.0.1", "192.168.1.0/24"]
nginx_drupal_hotlinking_protection: false
Expand All @@ -26,7 +27,7 @@ nginx_drupal_http_core:
client_max_body_size: "10m"
ssl_session_cache: true
nginx_drupal_ssl_protocols: [ "SSLv3", "TLSv1", "TLSv1.1", "TLSv1.2" ]
nginx_drupal_ssl_ecdh_curve: "secp521r1"
nginx_drupal_ssl_ecdh_curve: "secp521r1"
nginx_drupal_ssl_ciphers: "ECDH+aRSA+AESGCM:ECDH+aRSA+SHA384:ECDH+aRSA+SHA256:ECDH:EDH+CAMELLIA:EDH+aRSA:+CAMELLIA256:+AES256:+CAMELLIA128:+AES128:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:!RC4:!SEED:!ECDSA:CAMELLIA256-SHA:AES256-SHA:CAMELLIA128-SHA:AES128-SHA"
nginx_drupal_upstream_servers: ["unix:/var/run/php-fpm.sock", "php-fpm-zwei.sock"]
nginx_drupal_upstream_backup_servers: ["unix:/var/run/php-fpm-bkp.sock"]
Expand Down
16 changes: 12 additions & 4 deletions templates/sites-available/drupal-site.j2
Original file line number Diff line number Diff line change
Expand Up @@ -156,14 +156,18 @@ server {
server {
## This is to avoid the spurious if for sub-domain name
## "rewriting".
{% if nginx_drupal_use_spdy %}
{% if nginx_drupal_use_http2 %}
listen {{item.https.port}} ssl http2; # IPv4
{% elif nginx_drupal_use_spdy %}
listen {{item.https.port}} ssl spdy; # IPv4
{% else %}
listen {{item.https.port}} ssl; # IPv4
{% endif %}

{% if item.ipv6 is defined %}
{% if nginx_drupal_use_spdy %}
{% if nginx_drupal_use_http2 %}
listen [{{item.ipv6}}]:{{item.https.port}} ssl http2 ipv6only=on;
{% elif nginx_drupal_use_spdy %}
listen [{{item.ipv6}}]:{{item.https.port}} ssl spdy ipv6only=on;
{% else %}
listen [{{item.ipv6}}]:{{item.https.port}} ssl ipv6only=on;
Expand All @@ -187,14 +191,18 @@ server {

## HTTPS server.
server {
{% if nginx_drupal_use_spdy %}
{% if nginx_drupal_use_http2 %}
listen {{item.https.port}} ssl http2; # IPv4
{% elif nginx_drupal_use_spdy %}
listen {{item.https.port}} ssl spdy; # IPv4
{% else %}
listen {{item.https.port}} ssl; # IPv4
{% endif %}

{% if item.ipv6 is defined %}
{% if nginx_drupal_use_spdy %}
{% if nginx_drupal_use_http2 %}
listen [{{item.ipv6}}]:{{item.https.port}} ssl http2 ipv6only=on;
{% elif nginx_drupal_use_spdy %}
listen [{{item.ipv6}}]:{{item.https.port}} ssl spdy ipv6only=on;
{% else %}
listen [{{item.ipv6}}]:{{item.https.port}} ssl ipv6only=on;
Expand Down