initial version of nginx role
This commit is contained in:
parent
7dc298ce2f
commit
ae969d9ce3
3 changed files with 79 additions and 0 deletions
41
roles/nginx/server/templates/nginx.conf.j2
Normal file
41
roles/nginx/server/templates/nginx.conf.j2
Normal file
|
@ -0,0 +1,41 @@
|
|||
|
||||
include /usr/share/nginx/modules/mod-http-xslt-filter.conf;
|
||||
|
||||
user nginx;
|
||||
worker_processes auto;
|
||||
error_log /var/log/nginx/error.log;
|
||||
pid /run/nginx.pid;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
'"$http_user_agent" $host';
|
||||
access_log /var/log/nginx/access.log main;
|
||||
|
||||
ssl on;
|
||||
ssl_session_cache builtin:1000 shared:SSL:10m;
|
||||
ssl_protocols TLSv1.2;
|
||||
ssl_ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256;
|
||||
ssl_prefer_server_ciphers on;
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
listen [::]:443 ssl;
|
||||
server_name {{ inventory_hostname }};
|
||||
|
||||
ssl_certificate /etc/pki/tls/certs/{{ inventory_hostname }}.crt;
|
||||
ssl_trusted_certificate /etc/pki/tls/certs/ca.crt;
|
||||
ssl_certificate_key /etc/pki/tls/private/{{ inventory_hostname }}.key;
|
||||
|
||||
root /srv/web/{{ inventory_hostname }};
|
||||
|
||||
include /etc/nginx/conf.d/{{ inventory_hostname }}/*.conf;
|
||||
}
|
||||
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue