Merge pull request #85 from abraham1901/master
Fixed log name and better formatting
This commit is contained in:
commit
8e34b31c2a
4 changed files with 22 additions and 22 deletions
|
@ -1,14 +1,12 @@
|
|||
<% if @include_files %><% @include_files.each do |file| -%>
|
||||
include <%= file %>;
|
||||
<% end -%><% end -%>
|
||||
|
||||
<% if @vhost_cfg_append -%><% vhost_cfg_append.each do |key,value| -%>
|
||||
<%= key %> <%= value %>;
|
||||
<% end -%><% end -%>
|
||||
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
}
|
||||
|
||||
<% if rewrite_www_to_non_www %>
|
||||
<% if rewrite_www_to_non_www -%>
|
||||
server {
|
||||
listen <%= listen_ip %>;
|
||||
server_name www.<%= name.gsub(/^www\./, '') %>;
|
||||
|
|
|
@ -1,22 +1,23 @@
|
|||
server {
|
||||
listen <%= listen_ip %>:<%= listen_port %> <% if @listen_options %><%= listen_options %><% end %>;
|
||||
<% # check to see if ipv6 support exists in the kernel before applying %>
|
||||
<% if ipv6_enable == 'true' && (defined? ipaddress6) %>
|
||||
listen <%= listen_ip %>:<%= listen_port %><% if @listen_options %> <%= listen_options %><% end %>;
|
||||
<% # check to see if ipv6 support exists in the kernel before applying %>
|
||||
<% if ipv6_enable == 'true' && (defined? ipaddress6) %>
|
||||
listen [<%= ipv6_listen_ip %>]:<%= ipv6_listen_port %> <% if @ipv6_listen_options %><%= ipv6_listen_options %><% end %> ipv6only=on;
|
||||
<% end %>
|
||||
<% end %>
|
||||
server_name <%= rewrite_www_to_non_www ? name.gsub(/^www\./, '') : server_name.join(" ") %>;
|
||||
access_log <%= scope.lookupvar('nginx::params::nx_logdir')%>/<%= name %>.access.log;
|
||||
<% if defined? auth_basic -%>
|
||||
auth_basic "<%= auth_basic %>";
|
||||
<% end -%>
|
||||
<% if defined? auth_basic_user_file -%>
|
||||
auth_basic_user_file <%= auth_basic_user_file %>;
|
||||
<% end -%>
|
||||
<% if defined? auth_basic -%>
|
||||
auth_basic "<%= auth_basic %>";
|
||||
<% end -%>
|
||||
<% if defined? auth_basic_user_file -%>
|
||||
auth_basic_user_file <%= auth_basic_user_file %>;
|
||||
<% end -%>
|
||||
|
||||
<% proxy_set_header.each do |header| %>
|
||||
proxy_set_header <%= header %>;<% end %>
|
||||
<% if @rewrite_to_https %>
|
||||
<% proxy_set_header.each do |header| -%>
|
||||
proxy_set_header <%= header %>;
|
||||
<% end -%>
|
||||
<% if @rewrite_to_https -%>
|
||||
if ($ssl_protocol = "") {
|
||||
return 301 https://$host$request_uri ;
|
||||
}
|
||||
<% end %>
|
||||
<% end -%>
|
||||
|
|
|
@ -19,3 +19,4 @@
|
|||
<%= key %> <%= value %>;
|
||||
<% end -%><% end -%>
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@ server {
|
|||
ssl_protocols <%= ssl_protocols %>;
|
||||
ssl_ciphers <%= ssl_ciphers %>;
|
||||
ssl_prefer_server_ciphers on;
|
||||
|
||||
<% if auth_basic != :undef -%>
|
||||
auth_basic "<%= auth_basic %>";
|
||||
<% end -%>
|
||||
|
@ -22,5 +21,6 @@ server {
|
|||
auth_basic_user_file <%= auth_basic_user_file %>;
|
||||
<% end -%>
|
||||
|
||||
access_log <%= scope.lookupvar('nginx::params::nx_logdir')%>/ssl-<%= name %>.access.log;
|
||||
error_log <%= scope.lookupvar('nginx::params::nx_logdir')%>/ssl-<%= name %>.error.log;
|
||||
access_log <%= scope.lookupvar('nginx::params::nx_logdir')%>/ssl-<%= name.gsub(' ', '_') %>.access.log;
|
||||
error_log <%= scope.lookupvar('nginx::params::nx_logdir')%>/ssl-<%= name.gsub(' ', '_') %>.error.log;
|
||||
|
||||
|
|
Loading…
Reference in a new issue