-
Notifications
You must be signed in to change notification settings - Fork 64
/
nexus_proxy.nginx.conf.erb
39 lines (32 loc) · 1.03 KB
/
nexus_proxy.nginx.conf.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Generated by Chef for <%= @fqdn %>
# Local modifications will be overwritten.
server {
# Redirect HTTP to HTTPS
listen 80;
server_name <%= @server_name %>;
return 301 https://$host$request_uri;
}
server {
listen <%= @listen_port %> ssl;
server_name <%= @server_name %>;
ssl_certificate <%= @ssl_certificate %>;
ssl_certificate_key <%= @ssl_key %>;
access_log /var/log/nginx/repository.sonatype.org.ssl.access.log;
error_log /var/log/nginx/repository.sonatype.org.ssl.error.log;
#These come from node['nexus']['nginx']['server']['options']
<% @server_options.each do |option|%>
<%= option %>;
<% end %>
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_pass <%= @proxy_pass %>;
proxy_redirect default;
#These come from node['nexus']['nginx']['proxy']['options']
<% @proxy_options.each do |option|%>
<%= option %>;
<% end %>
}
}