Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
P
provision
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
1
Merge Requests
1
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
provision
Commits
f7e2d8dd
Commit
f7e2d8dd
authored
May 19, 2016
by
omega8cc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Nginx: Use HTTP/2 if detected as supported
Also, switch to wildcard listen directive (TLS SNI) on BOA(unfork).
parent
a19e495d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
3 deletions
+48
-3
http/Provision/Config/Nginx/Ssl/vhost_ssl.tpl.php
http/Provision/Config/Nginx/Ssl/vhost_ssl.tpl.php
+28
-2
http/Provision/Config/Nginx/Ssl/vhost_ssl_disabled.tpl.php
http/Provision/Config/Nginx/Ssl/vhost_ssl_disabled.tpl.php
+20
-1
No files found.
http/Provision/Config/Nginx/Ssl/vhost_ssl.tpl.php
View file @
f7e2d8dd
<?php
if
(
$this
->
ssl_enabled
&&
$this
->
ssl_key
)
:
?>
<?php
$satellite_mode
=
drush_get_option
(
'satellite_mode'
);
if
(
!
$satellite_mode
&&
$server
->
satellite_mode
)
{
$satellite_mode
=
$server
->
satellite_mode
;
}
$nginx_has_http2
=
drush_get_option
(
'nginx_has_http2'
);
if
(
!
$nginx_has_http2
&&
$server
->
nginx_has_http2
)
{
$nginx_has_http2
=
$server
->
nginx_has_http2
;
}
if
(
$nginx_has_http2
)
{
$ssl_args
=
"ssl http2"
;
}
else
{
$ssl_args
=
"ssl"
;
}
if
(
$satellite_mode
==
'boa'
)
{
$ssl_listen_ip
=
"*"
;
}
else
{
$ssl_listen_ip
=
$ip_address
;
}
?>
<?php
if
(
$this
->
redirection
)
:
?>
<?php
foreach
(
$this
->
aliases
as
$alias_url
)
:
?>
server {
listen
<?php
print
"
{
$
ip_address
}
:
{
$http_ssl_port
}
"
;
?>
;
listen
<?php
print
"
{
$
ssl_listen_ip
}
:
{
$http_ssl_port
}
{
$ssl_args
}
"
;
?>
;
<?php
// if we use redirections, we need to change the redirection
// target to be the original site URL ($this->uri instead of
...
...
@@ -61,7 +87,7 @@ server {
}
?>
fastcgi_param db_port
<?php
print
urlencode
(
$db_port
);
?>
;
listen
<?php
print
"
{
$
ip_address
}
:
{
$http_ssl_port
}
"
;
?>
;
listen
<?php
print
"
{
$
ssl_listen_ip
}
:
{
$http_ssl_port
}
{
$ssl_args
}
"
;
?>
;
server_name
<?php
// this is the main vhost, so we need to put the redirection
// target as the hostname (if it exists) and not the original URL
...
...
http/Provision/Config/Nginx/Ssl/vhost_ssl_disabled.tpl.php
View file @
f7e2d8dd
...
...
@@ -6,10 +6,29 @@ $satellite_mode = drush_get_option('satellite_mode');
if
(
!
$satellite_mode
&&
$server
->
satellite_mode
)
{
$satellite_mode
=
$server
->
satellite_mode
;
}
$nginx_has_http2
=
drush_get_option
(
'nginx_has_http2'
);
if
(
!
$nginx_has_http2
&&
$server
->
nginx_has_http2
)
{
$nginx_has_http2
=
$server
->
nginx_has_http2
;
}
if
(
$nginx_has_http2
)
{
$ssl_args
=
"ssl http2"
;
}
else
{
$ssl_args
=
"ssl"
;
}
if
(
$satellite_mode
==
'boa'
)
{
$ssl_listen_ip
=
"*"
;
}
else
{
$ssl_listen_ip
=
$ip_address
;
}
?>
server {
listen
<?php
print
"
{
$
ip_address
}
:
{
$http_ssl_port
}
"
;
?>
;
listen
<?php
print
"
{
$
ssl_listen_ip
}
:
{
$http_ssl_port
}
{
$ssl_args
}
"
;
?>
;
server_name
<?php
print
$this
->
uri
.
' '
.
implode
(
' '
,
str_replace
(
'/'
,
'.'
,
$this
->
aliases
));
?>
;
<?php
if
(
$satellite_mode
==
'boa'
)
:
?>
root /var/www/nginx-default;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment