Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: modules/web/templates/global.conf.erb

Issue 29805569: #12126 - Redirect aliases to a virtual host in filerserver role (Closed)
Patch Set: Created June 12, 2018, 7:36 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « modules/adblockplus/manifests/web/fileserver/repository.pp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <%- if @aliases %> 1 <%- if @aliases %>
2 <%- @aliases.each do |vhost_alias| %> 2 <%- @aliases.each do |vhost_alias| %>
3 server 3 server
4 { 4 {
5 server_name '<%= vhost_alias %>'; 5 server_name '<%= vhost_alias %>';
6 6
7 listen 80; 7 listen 80;
8 listen [::]:80; 8 listen [::]:80;
9 <%- if @certificate != @private_key %> 9 <%- if @certificate != @private_key %>
10 listen 443 ssl http2; 10 listen 443 ssl http2;
11 listen [::]:443 ssl http2; 11 listen [::]:443 ssl http2;
12 12
13 ssl_certificate <%= @certificate %>; 13 ssl_certificate <%= @certificate %>;
14 ssl_certificate_key <%= @private_key %>; 14 ssl_certificate_key <%= @private_key %>;
15 15
16 location / 16 location /
17 { 17 {
18 rewrite .* https://<%= @vhost %>/ redirect; 18 rewrite .* https://<%= @vhost or @repository_host %>/ redirect;
19 } 19 }
20 <%- else %> 20 <%- else %>
21 21
22 location / 22 location /
23 { 23 {
24 rewrite .* http://<%= @vhost %>/ redirect; 24 rewrite .* http://<%= @vhost or @repository_host %>/ redirect;
25 } 25 }
26 <%- end %> 26 <%- end %>
27 } 27 }
28 <%- end %> 28 <%- end %>
29 <%- end %> 29 <%- end %>
OLDNEW
« no previous file with comments | « modules/adblockplus/manifests/web/fileserver/repository.pp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld