Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
configuration
Commits
420f2d54
Commit
420f2d54
authored
Apr 26, 2017
by
Kevin Falcone
Committed by
GitHub
Apr 26, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3794 from appsembler/morgan/robustify-nginx
Robustify TLS nginx settings
parents
18815cc8
298423fc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
0 deletions
+34
-0
playbooks/roles/nginx/defaults/main.yml
+4
-0
playbooks/roles/nginx/tasks/main.yml
+20
-0
playbooks/roles/nginx/templates/etc/nginx/nginx.conf.j2
+10
-0
No files found.
playbooks/roles/nginx/defaults/main.yml
View file @
420f2d54
...
...
@@ -33,6 +33,10 @@ NGINX_HTTPS_REDIRECT_STRATEGY: "scheme"
NGINX_SSL_CERTIFICATE
:
'
ssl-cert-snakeoil.pem'
NGINX_SSL_KEY
:
'
ssl-cert-snakeoil.key'
NGINX_SSL_CIPHERS
:
"
'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA'"
NGINX_SSL_PROTOCOLS
:
"
TLSv1
TLSv1.1
TLSv1.2"
NGINX_DH_PARAMS_PATH
:
"
/etc/ssl/private/dhparams.pem"
NGINX_DH_KEYSIZE
:
2048
NGINX_LOG_FORMAT_NAME
:
'
p_combined'
# When set to False, nginx will pass X-Forwarded-For, X-Forwarded-Port,
...
...
playbooks/roles/nginx/tasks/main.yml
View file @
420f2d54
# requires:
# - common/tasks/main.yml
---
-
name
:
Create Diffie-Hellman parameters to prevent weak key exchange
command
:
openssl dhparam -out "{{ NGINX_DH_PARAMS_PATH | basename }}" {{ NGINX_DH_KEYSIZE }}
args
:
chdir
:
"
{{
NGINX_DH_PARAMS_PATH
|
dirname
}}"
creates
:
"
{{
NGINX_DH_PARAMS_PATH
}}"
tags
:
-
install
-
install:configuration
-
name
:
Restrict permissions of DH parameters file
file
:
path
:
"
{{
NGINX_DH_PARAMS_PATH
}}"
owner
:
"
root"
group
:
"
root"
mode
:
0600
tags
:
-
install
-
install:configuration
-
name
:
Create nginx app and data dirs
file
:
path
:
"
{{
item.path
}}"
...
...
playbooks/roles/nginx/templates/etc/nginx/nginx.conf.j2
View file @
420f2d54
...
...
@@ -45,6 +45,16 @@ http {
error_log {{ nginx_log_dir }}/error.log;
##
# SSL/TLS settings
##
ssl_protocols {{ NGINX_SSL_PROTOCOLS }};
ssl_ciphers {{ NGINX_SSL_CIPHERS }};
ssl_prefer_server_ciphers on;
ssl_dhparam {{ NGINX_DH_PARAMS_PATH }};
##
# Gzip Settings
##
...
...
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