add listen_port on rewrite_www_to_non_www

Adding the port in case it is not by default.
This commit is contained in:
Abdoul Bah 2013-08-15 17:04:36 +02:00
parent 8997529a6c
commit 1f007e3587

View file

@ -8,7 +8,7 @@ include <%= file %>;
}
<% if @rewrite_www_to_non_www -%>
server {
listen <%= @listen_ip %>;
listen <%= @listen_ip %>:<%= @listen_port %>;
server_name www.<%= @name.gsub(/^www\./, '') %>;
rewrite ^ http://<%= @name.gsub(/^www\./, '') %>$uri permanent;
}