Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
servers-config
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gruppo Sistemisti
servers-config
Commits
ec7457ea
Commit
ec7457ea
authored
Mar 15, 2018
by
Mattia Rizzolo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nginx: add a bunch of confs for better proxying and security
Signed-off-by:
Mattia Rizzolo
<
mattia@debian.org
>
parent
6730740d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
3 deletions
+21
-3
roles/nginx/tasks/setup.yml
roles/nginx/tasks/setup.yml
+1
-0
roles/nginx/templates/conf.d/misc.conf
roles/nginx/templates/conf.d/misc.conf
+16
-0
roles/nginx/templates/sites/proxied.conf
roles/nginx/templates/sites/proxied.conf
+4
-3
No files found.
roles/nginx/tasks/setup.yml
View file @
ec7457ea
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
mode
:
0644
mode
:
0644
with_items
:
with_items
:
-
misc.conf
-
optimize.conf
-
optimize.conf
notify
:
notify
:
...
...
roles/nginx/templates/conf.d/misc.conf
0 → 100644
View file @
ec7457ea
# proxy settings
include
proxy_params
;
# directly coming from the nginx package, they are sane
proxy_set_header
X
-
Forwarded
-
Server
$
hostname
;
# security/privacy settings
add_header
X
-
Frame
-
Options
"SAMEORIGIN"
;
add_header
X
-
Xss
-
Protection
"1; mode=block"
;
add_header
X
-
Content
-
Type
-
Options
"nosniff"
;
add_header
Referrer
-
Policy
"strict-origin-when-cross-origin"
;
# shared ssl settings
ssl_session_cache
shared
:
SSL
:
5
m
;
ssl_protocols
TLSv1
TLSv1
.
1
TLSv1
.
2
;
ssl_ciphers
HIGH
:!
aNULL
:!
eNULL
:!
EXP
:!
LOW
:!
MD5
;
ssl_prefer_server_ciphers
on
;
#ssl_dhparam dhparams.pem;
roles/nginx/templates/sites/proxied.conf
View file @
ec7457ea
...
@@ -18,11 +18,12 @@ server {
...
@@ -18,11 +18,12 @@ server {
listen
443
ssl
http2
;
listen
443
ssl
http2
;
server_name
{{
item
.
key
}};
server_name
{{
item
.
key
}};
ssl_certificate
/
etc
/
ssl
/
localcerts
/{{
item
.
key
}}/
fullchain
.
pem
;
ssl_certificate
{{
ssl_home
}}
/
localcerts
/{{
item
.
key
}}/
fullchain
.
pem
;
ssl_certificate_key
/
etc
/
ssl
/
localcerts
/{{
item
.
key
}}/
privkey
.
pem
;
ssl_certificate_key
{{
ssl_home
}}
/
localcerts
/{{
item
.
key
}}/
privkey
.
pem
;
location
/ {
location
/ {
proxy_set_header
Host
{{
item
.
key
}};
proxy_pass
http
://{{
item
.
value
}}/;
proxy_pass
http
://{{
item
.
value
}}/;
}
}
include
/
etc
/
nginx
/
snippets
/
dehydrated
.
conf
;
}
}
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