From 9bea7f7d0897b3deda95204f160fd570f6664101 Mon Sep 17 00:00:00 2001 From: Sadiq Saif Date: Thu, 9 Nov 2017 11:27:19 -0500 Subject: [PATCH] Add vhosts for ttrss.sadiqsaif.com --- ubuntu/site.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/ubuntu/site.yml b/ubuntu/site.yml index 8f700ac..dc1d962 100644 --- a/ubuntu/site.yml +++ b/ubuntu/site.yml @@ -216,6 +216,36 @@ - resolver 8.8.8.8 valid=300s - add_header Strict-Transport-Security max-age=31536000 - error_page 404 /404.html + ttrss.sadiqsaif.com.http: + - listen {{ ansible_default_ipv4.address }}:80 + - listen [{{ ansible_default_ipv6.address }}]:80 + - server_name ttrss.sadiqsaif.com + - return 301 "https://$host$request_uri" + ttrss.sadiqsaif.com.https: + - listen {{ ansible_default_ipv4.address }}:443 ssl http2 + - listen [{{ ansible_default_ipv6.address }}]:443 ssl http2 + - server_name ttrss.sadiqsaif.com + - root "/srv/www/ttrss.sadiqsaif.com" + - index index.php index.html + - access_log "/var/log/nginx/ttrss.sadiqsaif.com.access.log" + - error_log "/var/log/nginx/ttrss.sadiqsaif.com.error.log" + - client_max_body_size 10M + - ssl_certificate "/etc/ssl/letsencrypt/ttrss.sadiqsaif.com.crt" + - ssl_certificate_key "/etc/ssl/letsencrypt/ttrss.sadiqsaif.com.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 ~ \.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; + } nginx_configs: gzip: - gzip on