diff options
-rw-r--r-- | modules/nginx/manifests/site.pp | 5 | ||||
-rw-r--r-- | modules/tozt/files/nginx/blog-tls.conf | 15 | ||||
-rw-r--r-- | modules/tozt/files/nginx/blog.conf | 15 | ||||
-rw-r--r-- | modules/tozt/files/nginx/doy-tls.conf | 22 | ||||
-rw-r--r-- | modules/tozt/files/nginx/doy.conf | 22 | ||||
-rw-r--r-- | modules/tozt/files/nginx/mail-tls.conf | 25 | ||||
-rw-r--r-- | modules/tozt/files/nginx/mail.conf | 25 | ||||
-rw-r--r-- | modules/tozt/files/nginx/paste-tls.conf | 18 | ||||
-rw-r--r-- | modules/tozt/files/nginx/paste.conf | 18 | ||||
-rw-r--r-- | modules/tozt/manifests/site.pp | 12 |
10 files changed, 97 insertions, 80 deletions
diff --git a/modules/nginx/manifests/site.pp b/modules/nginx/manifests/site.pp index dc25bb3..130a086 100644 --- a/modules/nginx/manifests/site.pp +++ b/modules/nginx/manifests/site.pp @@ -12,4 +12,9 @@ define nginx::site($content=undef, $source=undef, $enabled=true) { target => "../sites-available/$name"; } } + else { + file { "/etc/nginx/sites-enabled/$name": + ensure => absent; + } + } } diff --git a/modules/tozt/files/nginx/blog-tls.conf b/modules/tozt/files/nginx/blog-tls.conf new file mode 100644 index 0000000..25e9a86 --- /dev/null +++ b/modules/tozt/files/nginx/blog-tls.conf @@ -0,0 +1,15 @@ +server { + listen 443; + server_name blog.tozt.net; + + access_log /var/log/nginx/blog.access.log; + error_log /var/log/nginx/blog.error.log; + + include ssl; + + location / { + root /home/doy/blog; + index index.html; + } +} +# vim:ft=nginx diff --git a/modules/tozt/files/nginx/blog.conf b/modules/tozt/files/nginx/blog.conf index b1af3b6..59fc1c6 100644 --- a/modules/tozt/files/nginx/blog.conf +++ b/modules/tozt/files/nginx/blog.conf @@ -10,19 +10,4 @@ server { index index.html; } } - -server { - listen 443; - server_name blog.tozt.net; - - access_log /var/log/nginx/blog.access.log; - error_log /var/log/nginx/blog.error.log; - - include ssl; - - location / { - root /home/doy/blog; - index index.html; - } -} # vim:ft=nginx diff --git a/modules/tozt/files/nginx/doy-tls.conf b/modules/tozt/files/nginx/doy-tls.conf new file mode 100644 index 0000000..e71246a --- /dev/null +++ b/modules/tozt/files/nginx/doy-tls.conf @@ -0,0 +1,22 @@ +server { + listen 443 default; + server_name tozt.net; + + access_log /var/log/nginx/doy.access.log; + error_log /var/log/nginx/doy.error.log; + + include ssl; + + location / { + root /home/doy/public_html; + index index.html index.htm; + } + + location /recipes/ { + root /home/doy/public_html; + index index.html index.htm; + default_type text/plain; + autoindex on; + } +} +# vim:ft=nginx diff --git a/modules/tozt/files/nginx/doy.conf b/modules/tozt/files/nginx/doy.conf index 071f3a4..cc0744e 100644 --- a/modules/tozt/files/nginx/doy.conf +++ b/modules/tozt/files/nginx/doy.conf @@ -17,26 +17,4 @@ server { autoindex on; } } - -server { - listen 443 default; - server_name tozt.net; - - access_log /var/log/nginx/doy.access.log; - error_log /var/log/nginx/doy.error.log; - - include ssl; - - location / { - root /home/doy/public_html; - index index.html index.htm; - } - - location /recipes/ { - root /home/doy/public_html; - index index.html index.htm; - default_type text/plain; - autoindex on; - } -} # vim:ft=nginx diff --git a/modules/tozt/files/nginx/mail-tls.conf b/modules/tozt/files/nginx/mail-tls.conf new file mode 100644 index 0000000..c96c749 --- /dev/null +++ b/modules/tozt/files/nginx/mail-tls.conf @@ -0,0 +1,25 @@ +server { + listen 443; + server_name mail.tozt.net; + + access_log /var/log/nginx/mail.access.log; + error_log /var/log/nginx/mail.error.log; + + include ssl; + add_header Strict-Transport-Security max-age=15768000; + + location / { + root /usr/share/webapps/roundcubemail; + index index.php index.html index.htm; + } + + location ~ \.php$ { + root /usr/share/webapps/roundcubemail; + fastcgi_pass 127.0.0.1:9000; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME /usr/share/webapps/roundcubemail$fastcgi_script_name; + fastcgi_param HTTPS on; + include fastcgi_params; + } +} +# vim:ft=nginx diff --git a/modules/tozt/files/nginx/mail.conf b/modules/tozt/files/nginx/mail.conf index 5af975a..33842a7 100644 --- a/modules/tozt/files/nginx/mail.conf +++ b/modules/tozt/files/nginx/mail.conf @@ -7,29 +7,4 @@ server { rewrite ^(.*) https://$host$1 permanent; } - -server { - listen 443; - server_name mail.tozt.net; - - access_log /var/log/nginx/mail.access.log; - error_log /var/log/nginx/mail.error.log; - - include ssl; - add_header Strict-Transport-Security max-age=15768000; - - location / { - root /usr/share/webapps/roundcubemail; - index index.php index.html index.htm; - } - - location ~ \.php$ { - root /usr/share/webapps/roundcubemail; - fastcgi_pass 127.0.0.1:9000; - fastcgi_index index.php; - fastcgi_param SCRIPT_FILENAME /usr/share/webapps/roundcubemail$fastcgi_script_name; - fastcgi_param HTTPS on; - include fastcgi_params; - } -} # vim:ft=nginx diff --git a/modules/tozt/files/nginx/paste-tls.conf b/modules/tozt/files/nginx/paste-tls.conf new file mode 100644 index 0000000..b73d7a8 --- /dev/null +++ b/modules/tozt/files/nginx/paste-tls.conf @@ -0,0 +1,18 @@ +server { + listen 443; + server_name paste.tozt.net; + + access_log /var/log/nginx/paste.access.log; + error_log /var/log/nginx/paste.error.log; + + include ssl; + + include /etc/nginx/mime.types.paste; + + root /home/doy/paste; + default_type text/plain; + gzip_types text/plain; + + location / { } +} +# vim:ft=nginx diff --git a/modules/tozt/files/nginx/paste.conf b/modules/tozt/files/nginx/paste.conf index 3b98aaf..7305455 100644 --- a/modules/tozt/files/nginx/paste.conf +++ b/modules/tozt/files/nginx/paste.conf @@ -13,22 +13,4 @@ server { location / { } } - -server { - listen 443; - server_name paste.tozt.net; - - access_log /var/log/nginx/paste.access.log; - error_log /var/log/nginx/paste.error.log; - - include ssl; - - include /etc/nginx/mime.types.paste; - - root /home/doy/paste; - default_type text/plain; - gzip_types text/plain; - - location / { } -} # vim:ft=nginx diff --git a/modules/tozt/manifests/site.pp b/modules/tozt/manifests/site.pp index c71ba76..3cf1638 100644 --- a/modules/tozt/manifests/site.pp +++ b/modules/tozt/manifests/site.pp @@ -1,11 +1,23 @@ class tozt::site { nginx::site { + "blog-tls": + source => 'puppet:///modules/tozt/nginx/blog-tls.conf', + enabled => false; "blog": source => 'puppet:///modules/tozt/nginx/blog.conf'; + "doy-tls": + source => 'puppet:///modules/tozt/nginx/doy-tls.conf', + enabled => false; "doy": source => 'puppet:///modules/tozt/nginx/doy.conf'; + "mail-tls": + source => 'puppet:///modules/tozt/nginx/mail-tls.conf', + enabled => false; "mail": source => 'puppet:///modules/tozt/nginx/mail.conf'; + "paste-tls": + source => 'puppet:///modules/tozt/nginx/paste-tls.conf', + enabled => false; "paste": source => 'puppet:///modules/tozt/nginx/paste.conf'; } |