do www-rewrite with params
This commit is contained in:
parent
1620e18c63
commit
8acfac5b6d
3 changed files with 8 additions and 8 deletions
|
@ -53,7 +53,7 @@ describe 'nginx::resource::vhost' do
|
||||||
^
|
^
|
||||||
\s+listen\s+\*:80;\n
|
\s+listen\s+\*:80;\n
|
||||||
\s+server_name\s+www\.rspec\.example\.com;\n
|
\s+server_name\s+www\.rspec\.example\.com;\n
|
||||||
\s+return\s+301\s+http://rspec\.example\.com\$uri;
|
\s+return\s+301\s+http://rspec\.example\.com\$request_uri;
|
||||||
|x,
|
|x,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -64,7 +64,7 @@ describe 'nginx::resource::vhost' do
|
||||||
^
|
^
|
||||||
\s+listen\s+\*:80;\n
|
\s+listen\s+\*:80;\n
|
||||||
\s+server_name\s+www\.rspec\.example\.com;\n
|
\s+server_name\s+www\.rspec\.example\.com;\n
|
||||||
\s+return\s+301\s+http://rspec\.example\.com\$uri;
|
\s+return\s+301\s+http://rspec\.example\.com\$request_uri;
|
||||||
|x,
|
|x,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -276,7 +276,7 @@ describe 'nginx::resource::vhost' do
|
||||||
^
|
^
|
||||||
\s+listen\s+\*:443\s+ssl;\n
|
\s+listen\s+\*:443\s+ssl;\n
|
||||||
\s+server_name\s+www\.rspec\.example\.com;\n
|
\s+server_name\s+www\.rspec\.example\.com;\n
|
||||||
\s+return\s+301\s+https://rspec\.example\.com\$uri;
|
\s+return\s+301\s+https://rspec\.example\.com\$request_uri;
|
||||||
|x,
|
|x,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -341,7 +341,7 @@ describe 'nginx::resource::vhost' do
|
||||||
^
|
^
|
||||||
\s+listen\s+\*:443\s+ssl;\n
|
\s+listen\s+\*:443\s+ssl;\n
|
||||||
\s+server_name\s+www\.rspec\.example\.com;\n
|
\s+server_name\s+www\.rspec\.example\.com;\n
|
||||||
\s+return\s+301\s+https://rspec\.example\.com\$uri;
|
\s+return\s+301\s+https://rspec\.example\.com\$request_uri;
|
||||||
|x,
|
|x,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -352,7 +352,7 @@ describe 'nginx::resource::vhost' do
|
||||||
^
|
^
|
||||||
\s+listen\s+\*:443\s+ssl;\n
|
\s+listen\s+\*:443\s+ssl;\n
|
||||||
\s+server_name\s+www\.rspec\.example\.com;\n
|
\s+server_name\s+www\.rspec\.example\.com;\n
|
||||||
\s+return\s+301\s+https://rspec\.example\.com\$uri;
|
\s+return\s+301\s+https://rspec\.example\.com\$request_uri;
|
||||||
|x,
|
|x,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -597,7 +597,7 @@ describe 'nginx::resource::vhost' do
|
||||||
^
|
^
|
||||||
\s+listen\s+\*:443\s+ssl;\n
|
\s+listen\s+\*:443\s+ssl;\n
|
||||||
\s+server_name\s+www\.rspec\.example\.com;\n
|
\s+server_name\s+www\.rspec\.example\.com;\n
|
||||||
\s+return\s+301\s+https://rspec\.example\.com\$uri;
|
\s+return\s+301\s+https://rspec\.example\.com\$request_uri;
|
||||||
|x,
|
|x,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
server {
|
server {
|
||||||
listen <%= @listen_ip %>:<%= @listen_port %>;
|
listen <%= @listen_ip %>:<%= @listen_port %>;
|
||||||
server_name www.<%= @server_name[0].gsub(/^www\./, '') %>;
|
server_name www.<%= @server_name[0].gsub(/^www\./, '') %>;
|
||||||
return 301 http://<%= @server_name[0].gsub(/^www\./, '') %>$uri;
|
return 301 http://<%= @server_name[0].gsub(/^www\./, '') %>$request_uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
server {
|
server {
|
||||||
listen <%= @listen_ip %>:<%= @ssl_port %> ssl;
|
listen <%= @listen_ip %>:<%= @ssl_port %> ssl;
|
||||||
server_name www.<%= @server_name[0].gsub(/^www\./, '') %>;
|
server_name www.<%= @server_name[0].gsub(/^www\./, '') %>;
|
||||||
return 301 https://<%= @server_name[0].gsub(/^www\./, '') %>$uri;
|
return 301 https://<%= @server_name[0].gsub(/^www\./, '') %>$request_uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
Loading…
Reference in a new issue