Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

nginx webui proxy aliases will be redirected to server_name

  • Loading branch information...
commit 45934639ea94cd87000685c41a471e8d3fa92859 1 parent 0b18688
@reset reset authored committed
Showing with 11 additions and 0 deletions.
  1. +11 −0 templates/default/chef_server.nginx.conf.erb
View
11 templates/default/chef_server.nginx.conf.erb
@@ -72,4 +72,15 @@ server {
try_files $uri @chef_server_webui;
}
}
+
+<% if @webui_aliases && @webui_aliases.length > 0 %>
+server {
+ server_name <%= @webui_aliases.join(' ') %>;
+ access_log <%= node[:nginx][:log_dir] %>/chef-server.access.log;
+ error_log <%= node[:nginx][:log_dir] %>/chef-server.error.log warn;
+
+ rewrite ^(.+)$ https://<%= @webui_server_name %>$1 permanent;
+}
+
+<% end %>
<% end -%>
Please sign in to comment.
Something went wrong with that request. Please try again.