2015-05-24 17:22:57 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
- name: apply common configuration to all nodes
|
|
|
|
hosts: all
|
|
|
|
user: root
|
|
|
|
|
|
|
|
roles:
|
|
|
|
- common
|
2017-01-13 02:43:11 +00:00
|
|
|
|
|
|
|
- name: install PHP-FPM to required nodes
|
|
|
|
hosts: php
|
|
|
|
user: root
|
|
|
|
|
|
|
|
roles:
|
|
|
|
- php
|
2017-01-13 03:00:01 +00:00
|
|
|
|
2017-01-13 22:21:21 +00:00
|
|
|
- name: Generate LE certs on required servers
|
|
|
|
hosts: webservers
|
|
|
|
user: root
|
|
|
|
|
|
|
|
roles:
|
|
|
|
- letsencrypt
|
|
|
|
|
2017-01-13 03:00:01 +00:00
|
|
|
- hosts: webservers
|
|
|
|
|
|
|
|
roles:
|
|
|
|
- role: jdauphant.nginx
|
|
|
|
nginx_user: "www-data"
|
|
|
|
nginx_http_params:
|
|
|
|
- sendfile "on"
|
2017-01-13 03:15:16 +00:00
|
|
|
- server_names_hash_bucket_size 512
|
2017-01-14 00:17:51 +00:00
|
|
|
nginx_sites:
|
|
|
|
asininetech.com:
|
|
|
|
- listen {{ ansible_default_ipv4.address }}:80
|
|
|
|
- listen {{ ansible_default_ipv4.address }}:443 ssl
|
|
|
|
- listen [{{ ansible_default_ipv6.address }}]:80
|
|
|
|
- listen [{{ ansible_default_ipv6.address }}]:443 ssl
|
|
|
|
- server_name asininetech.com
|
|
|
|
- root "/srv/www/asininetech.com"
|
|
|
|
- index index.php index.html
|
|
|
|
- access_log "/var/log/nginx/asininetech.com.access.log"
|
|
|
|
- error_log "/var/log/nginx/asininetech.com.error.log"
|
|
|
|
- client_max_body_size 10M
|
|
|
|
- ssl_certificate "/etc/letsencrypt/live/asininetech.com/fullchain.pem"
|
|
|
|
- ssl_certificate_key "/etc/letsencrypt/live/asininetech.com/privkey.pem"
|
|
|
|
- ssl_stapling on
|
|
|
|
- resolver 8.8.8.8 valid=300s
|
|
|
|
- add_header Strict-Transport-Security max-age=31536000
|
|
|
|
- location / {
|
|
|
|
try_files $uri $uri/ /index.php?$args;
|
|
|
|
}
|
|
|
|
- location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
|
|
|
|
expires 24h;
|
|
|
|
}
|
|
|
|
- location ~ \.php$ {
|
|
|
|
try_files $uri =404;
|
|
|
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
|
|
|
include fastcgi_params;
|
|
|
|
fastcgi_index index.php;
|
|
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
|
|
fastcgi_pass php;
|
|
|
|
}
|
|
|
|
entropynet.net:
|
|
|
|
- listen {{ ansible_default_ipv4.address }}:80
|
|
|
|
- listen {{ ansible_default_ipv4.address }}:443 ssl
|
|
|
|
- listen [{{ ansible_default_ipv6.address }}]:80
|
|
|
|
- listen [{{ ansible_default_ipv6.address }}]:443 ssl
|
|
|
|
- server_name entropynet.net
|
|
|
|
- root "/srv/www/entropynet.net"
|
|
|
|
- index index.html
|
|
|
|
- access_log "/var/log/nginx/entropynet.net.access.log"
|
|
|
|
- error_log "/var/log/nginx/entropynet.net.error.log"
|
|
|
|
- ssl_certificate "/etc/letsencrypt/live/entropynet.net/fullchain.pem"
|
|
|
|
- ssl_certificate_key "/etc/letsencrypt/live/entropynet.net/privkey.pem"
|
|
|
|
- ssl_stapling on
|
|
|
|
- resolver 8.8.8.8 valid=300s
|
|
|
|
- add_header Strict-Transport-Security max-age=31536000
|
|
|
|
i.asininetech.com:
|
|
|
|
- listen {{ ansible_default_ipv4.address }}:80
|
|
|
|
- listen {{ ansible_default_ipv4.address }}:443 ssl
|
|
|
|
- listen [{{ ansible_default_ipv6.address }}]:80
|
|
|
|
- listen [{{ ansible_default_ipv6.address }}]:443 ssl
|
|
|
|
- server_name i.asininetech.com
|
|
|
|
- root "/home/tenshi/public_html"
|
|
|
|
- index index.html
|
|
|
|
- access_log "/var/log/nginx/i.asininetech.com.access.log"
|
|
|
|
- error_log "/var/log/nginx/i.asininetech.com.error.log"
|
|
|
|
- ssl_certificate "/etc/letsencrypt/live/i.asininetech.com/fullchain.pem"
|
|
|
|
- ssl_certificate_key "/etc/letsencrypt/live/i.asininetech.com/privkey.pem"
|
|
|
|
- ssl_stapling on
|
|
|
|
- resolver 8.8.8.8 valid=300s
|
|
|
|
- location / {
|
|
|
|
autoindex off;
|
|
|
|
autoindex_exact_size off;
|
|
|
|
}
|
|
|
|
- add_header Strict-Transport-Security max-age=31536000
|
|
|
|
sadiqsaif.ca:
|
2017-03-18 01:57:01 +00:00
|
|
|
- listen {{ ansible_default_ipv4.address }}:80
|
2017-01-14 00:17:51 +00:00
|
|
|
- listen {{ ansible_default_ipv4.address }}:443 ssl
|
2017-03-18 01:57:01 +00:00
|
|
|
- listen [{{ ansible_default_ipv6_address }}]:80
|
2017-01-14 00:17:51 +00:00
|
|
|
- listen [{{ ansible_default_ipv6.address }}]:443 ssl
|
|
|
|
- server_name sadiqsaif.ca
|
|
|
|
- access_log "/var/log/nginx/sadiqsaif.ca.access.log"
|
|
|
|
- error_log "/var/log/nginx/sadiqsaif.ca.error.log"
|
|
|
|
- ssl_certificate "/etc/letsencrypt/live/sadiqsaif.ca/fullchain.pem"
|
|
|
|
- ssl_certificate_key "/etc/letsencrypt/live/sadiqsaif.ca/privkey.pem"
|
|
|
|
- ssl_stapling on
|
|
|
|
- resolver 8.8.8.8 valid=300s
|
|
|
|
- add_header Strict-Transport-Security max-age=31536000
|
2017-03-17 02:45:44 +00:00
|
|
|
- return 301 "$scheme://sadiqsaif.com$request_uri"
|
2017-01-14 00:17:51 +00:00
|
|
|
staticsafe.ca:
|
|
|
|
- listen {{ ansible_default_ipv4.address }}:80
|
|
|
|
- listen {{ ansible_default_ipv4.address }}:443 ssl
|
|
|
|
- listen [{{ ansible_default_ipv6.address }}]:80
|
|
|
|
- listen [{{ ansible_default_ipv6.address }}]:443 ssl
|
|
|
|
- server_name staticsafe.ca
|
|
|
|
- root "/srv/www/staticsafe.ca"
|
|
|
|
- index staticsafe.ca.html
|
|
|
|
- access_log "/var/log/nginx/staticsafe.ca.access.log"
|
|
|
|
- error_log "/var/log/nginx/staticsafe.ca.error.log"
|
|
|
|
- ssl_certificate "/etc/letsencrypt/live/staticsafe.ca/fullchain.pem"
|
|
|
|
- ssl_certificate_key "/etc/letsencrypt/live/staticsafe.ca/privkey.pem"
|
|
|
|
- ssl_stapling on
|
|
|
|
- resolver 8.8.8.8 valid=300s
|
|
|
|
- add_header Strict-Transport-Security max-age=31536000
|
|
|
|
twoshadesofbrown.com:
|
|
|
|
- listen {{ ansible_default_ipv4.address }}:80
|
|
|
|
- listen {{ ansible_default_ipv4.address }}:443 ssl
|
|
|
|
- listen [{{ ansible_default_ipv6.address }}]:80
|
|
|
|
- listen [{{ ansible_default_ipv6.address }}]:443 ssl
|
2017-01-14 01:12:37 +00:00
|
|
|
- server_name twoshadesofbrown.com
|
2017-01-14 00:17:51 +00:00
|
|
|
- root "/srv/www/twoshadesofbrown.com"
|
|
|
|
- index index.php index.html
|
|
|
|
- access_log "/var/log/nginx/twoshadesofbrown.com.access.log"
|
|
|
|
- error_log "/var/log/nginx/twoshadesofbrown.com.error.log"
|
|
|
|
- client_max_body_size 10M
|
|
|
|
- ssl_certificate "/etc/letsencrypt/live/twoshadesofbrown.com/fullchain.pem"
|
|
|
|
- ssl_certificate_key "/etc/letsencrypt/live/twoshadesofbrown.com/privkey.pem"
|
|
|
|
- ssl_stapling on
|
|
|
|
- resolver 8.8.8.8 valid=300s
|
|
|
|
- add_header Strict-Transport-Security max-age=31536000
|
|
|
|
- location / {
|
|
|
|
try_files $uri $uri/ /index.php?$args;
|
|
|
|
}
|
|
|
|
- location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
|
|
|
|
expires 24h;
|
|
|
|
}
|
|
|
|
- location ~ \.php$ {
|
|
|
|
try_files $uri =404;
|
|
|
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
|
|
|
include fastcgi_params;
|
|
|
|
fastcgi_index index.php;
|
|
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
|
|
fastcgi_pass php;
|
|
|
|
}
|
|
|
|
wiki.staticsafe.ca:
|
|
|
|
- listen {{ ansible_default_ipv4.address }}:80
|
|
|
|
- listen {{ ansible_default_ipv4.address }}:443 ssl
|
|
|
|
- listen [{{ ansible_default_ipv6.address }}]:80
|
|
|
|
- listen [{{ ansible_default_ipv6.address }}]:443 ssl
|
|
|
|
- server_name wiki.staticsafe.ca
|
|
|
|
- root "/srv/www/wiki.staticsafe.ca"
|
|
|
|
- index index.php
|
|
|
|
- access_log "/var/log/nginx/wiki.staticsafe.ca.access.log"
|
|
|
|
- error_log "/var/log/nginx/wiki.staticsafe.ca.error.log"
|
|
|
|
- ssl_certificate "/etc/letsencrypt/live/wiki.staticsafe.ca/fullchain.pem"
|
|
|
|
- ssl_certificate_key "/etc/letsencrypt/live/wiki.staticsafe.ca/privkey.pem"
|
|
|
|
- ssl_stapling on
|
|
|
|
- resolver 8.8.8.8 valid=300s
|
|
|
|
- add_header Strict-Transport-Security max-age=31536000
|
2017-01-14 04:08:03 +00:00
|
|
|
- location ~ /(data|conf|bin|inc)/ {
|
|
|
|
deny all;
|
|
|
|
}
|
2017-01-14 00:17:51 +00:00
|
|
|
- location / {
|
|
|
|
try_files $uri $uri/ /index.php?$args;
|
|
|
|
}
|
|
|
|
- location ~ \.php$ {
|
|
|
|
try_files $uri =404;
|
|
|
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
|
|
|
include fastcgi_params;
|
|
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
|
|
fastcgi_pass php;
|
|
|
|
fastcgi_index index.php;
|
|
|
|
}
|
2017-03-17 02:39:11 +00:00
|
|
|
sadiqsaif.com:
|
2017-03-18 01:57:01 +00:00
|
|
|
- listen {{ ansible_default_ipv4.address }}:80
|
2017-03-17 02:39:11 +00:00
|
|
|
- listen {{ ansible_default_ipv4.address }}:443 ssl
|
2017-03-18 01:57:01 +00:00
|
|
|
- listen [{{ ansible_default_ipv6.address }}]:80
|
2017-03-17 02:39:11 +00:00
|
|
|
- listen [{{ ansible_default_ipv6.address }}]:443 ssl
|
|
|
|
- server_name sadiqsaif.com
|
|
|
|
- root "/srv/www/sadiqsaif.com"
|
|
|
|
- index index.html
|
|
|
|
- access_log "/var/log/nginx/sadiqsaif.com.access.log"
|
|
|
|
- error_log "/var/log/nginx/sadiqsaif.com.error.log"
|
|
|
|
- ssl_certificate "/etc/letsencrypt/live/sadiqsaif.com/fullchain.pem"
|
|
|
|
- ssl_certificate_key "/etc/letsencrypt/live/sadiqsaif.com/privkey.pem"
|
|
|
|
- ssl_stapling on
|
|
|
|
- resolver 8.8.8.8 valid=300s
|
|
|
|
- add_header Strict-Transport-Security max-age=31536000
|
|
|
|
- error_page 404 /404.html
|
2017-01-13 03:00:01 +00:00
|
|
|
nginx_configs:
|
|
|
|
gzip:
|
|
|
|
- gzip on
|
|
|
|
- gzip_disable msie6
|
|
|
|
upstream:
|
2017-01-13 03:05:20 +00:00
|
|
|
- upstream php { server unix:/run/php/php7.0-fpm.sock; }
|
2017-01-13 03:00:01 +00:00
|
|
|
ssl:
|
|
|
|
- ssl_protocols TLSv1 TLSv1.1 TLSv1.2
|
|
|
|
- ssl_prefer_server_ciphers on
|
2017-01-14 01:59:08 +00:00
|
|
|
- ssl_dhparam "/etc/nginx/dhparams.pem"
|