Commit 33a7831

mo khan <mo@mokhan.ca>
2015-11-12 03:11:20
disable nginx server tokens.
1 parent db3a2c8
Changed files (2)
recipes
templates
recipes/aws.rb
@@ -1,7 +1,7 @@
-package 'python-pip'
-execute 'pip install awscli'
+package "python-pip"
+execute "pip install awscli"
 
-username = node['stronglifters']['username']
+username = node["stronglifters"]["username"]
 directory "/home/#{username}/.aws/" do
   owner username
   group username
@@ -10,7 +10,7 @@ directory "/home/#{username}/.aws/" do
   action :create
 end
 
-configuration = node['stronglifters']['aws']
+configuration = node["stronglifters"]["aws"]
 template "/home/#{username}/.aws/config" do
   source "aws/config.erb"
   variables(configuration)
templates/nginx.conf.erb
@@ -35,11 +35,13 @@ http {
   server {
     listen 80 deferred;
     server_name <%= @domain %>;
+    server_tokens off;
     rewrite        ^ https://$server_name$request_uri? permanent;
   }
   server {
     listen 443 default_server ssl;
     server_name  <%= @domain %>;
+    server_tokens off;
     root         <%= node['stronglifters']['root_path'] %>/current/public;
     ssl_certificate             /etc/nginx/ssl/<%= @domain %>.crt;
     ssl_certificate_key         /etc/nginx/ssl/<%= @domain %>.key;