0001-nginx-example.conf-redirect-non-ssl-requests.patch
debian/nginx-example.conf | ||
---|---|---|
38 | 38 |
access_log /var/log/nginx/combo.example.org-access.log combined; |
39 | 39 |
error_log /var/log/nginx/combo.example.org-error.log; |
40 | 40 | |
41 |
location ~ ^/static/(.+)$ { |
|
42 |
root /; |
|
43 |
try_files /var/lib/combo/tenants/$host/static/$1 |
|
44 |
/var/lib/combo/collectstatic/$1 |
|
45 |
=404; |
|
46 |
} |
|
47 | ||
48 |
location ~ ^/media/(.+)$ { |
|
49 |
alias /var/lib/combo/tenants/$host/media/$1; |
|
50 |
} |
|
51 | ||
52 |
location / { |
|
53 |
proxy_pass http://unix:/var/run/combo/combo.sock; |
|
54 |
proxy_set_header Host $http_host; |
|
55 |
proxy_set_header X-Real-IP $remote_addr; |
|
56 |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
|
57 |
} |
|
41 |
return 302 https://$host$request_uri; |
|
58 | 42 |
} |
59 |
- |