Skip to content
This repository has been archived by the owner on Nov 23, 2017. It is now read-only.

Commit

Permalink
nginx webui proxy aliases will be redirected to server_name
Browse files Browse the repository at this point in the history
  • Loading branch information
reset authored and jtimberman committed Feb 2, 2012
1 parent fa9b442 commit 4b664b0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions chef-server/templates/default/chef_server.nginx.conf.erb
Expand Up @@ -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 -%>

0 comments on commit 4b664b0

Please sign in to comment.