Révision 69e4aa05
Ajouté par Serghei Mihai (congés, retour 15/05) il y a presque 9 ans
debian/nginx-example.conf | ||
---|---|---|
1 |
server { |
|
2 |
listen 443; |
|
3 |
server_name u-auth.example.org; |
|
4 |
|
|
5 |
ssl on; |
|
6 |
ssl_certificate /etc/ssl/certs/ssl-cert-snakeoil.pem; |
|
7 |
ssl_certificate_key /etc/ssl/private/ssl-cert-snakeoil.key; |
|
8 |
|
|
9 |
access_log /var/log/nginx/u-auth.example.org-access.log combined; |
|
10 |
error_log /var/log/nginx/u-auth.example.org-error.log; |
|
11 |
|
|
12 |
location ~ ^/([^/]*)/static/(.+)$ { |
|
13 |
root /; |
|
14 |
try_files /var/lib/u-auth/organizations/$1/static/$2 |
|
15 |
=404; |
|
16 |
} |
|
17 |
|
|
18 |
location ~ ^/static/(.+) { |
|
19 |
root /; |
|
20 |
try_files /var/lib/u-auth/static/$1 |
|
21 |
/var/lib/u-auth/collectstatic/$1 |
|
22 |
=404; |
|
23 |
} |
|
24 |
|
|
25 |
|
|
26 |
location ~ ^/media/(.+)$ { |
|
27 |
alias /var/lib/u-auth/media/$1; |
|
28 |
} |
|
29 |
|
|
30 |
location / { |
|
31 |
proxy_pass http://unix:/var/run/u-auth/u-auth.sock; |
|
32 |
proxy_set_header Host $http_host; |
|
33 |
proxy_set_header X-Forwarded-SSL on; |
|
34 |
proxy_set_header X-Forwarded-Protocol ssl; |
|
35 |
proxy_set_header X-Forwarded-Proto https; |
|
36 |
proxy_set_header X-Real-IP $remote_addr; |
|
37 |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
|
38 |
} |
|
39 |
} |
|
40 |
|
|
41 |
server { |
|
42 |
listen 80; |
|
43 |
server_name u-auth.example.org; |
|
44 |
|
|
45 |
access_log /var/log/nginx/u-auth.example.org-access.log combined; |
|
46 |
error_log /var/log/nginx/u-auth.example.org-error.log; |
|
47 |
|
|
48 |
location ~ ^/static/(.+)$ { |
|
49 |
root /; |
|
50 |
try_files /var/lib/u-auth/static/$1 |
|
51 |
/var/lib/u-auth/collectstatic/$1 |
|
52 |
=404; |
|
53 |
} |
|
54 |
|
|
55 |
location ~ ^/media/(.+)$ { |
|
56 |
alias /var/lib/u-auth/media/$1; |
|
57 |
} |
|
58 |
|
|
59 |
location / { |
|
60 |
proxy_pass http://unix:/var/run/u-auth/u-auth.sock; |
|
61 |
proxy_set_header Host $http_host; |
|
62 |
proxy_set_header X-Real-IP $remote_addr; |
|
63 |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
|
64 |
} |
|
65 |
} |
debian/share/nginx-example.conf | ||
---|---|---|
1 |
server { |
|
2 |
listen 443; |
|
3 |
server_name u-auth.example.org; |
|
4 |
|
|
5 |
ssl on; |
|
6 |
ssl_certificate /etc/ssl/certs/ssl-cert-snakeoil.pem; |
|
7 |
ssl_certificate_key /etc/ssl/private/ssl-cert-snakeoil.key; |
|
8 |
|
|
9 |
access_log /var/log/nginx/u-auth.example.org-access.log combined; |
|
10 |
error_log /var/log/nginx/u-auth.example.org-error.log; |
|
11 |
|
|
12 |
location ~ ^/([^/]*)/static/(.+)$ { |
|
13 |
root /; |
|
14 |
try_files /var/lib/u-auth/organizations/$1/static/$2 |
|
15 |
=404; |
|
16 |
} |
|
17 |
|
|
18 |
location ~ ^/static/(.+) { |
|
19 |
root /; |
|
20 |
try_files /var/lib/u-auth/static/$1 |
|
21 |
/var/lib/u-auth/collectstatic/$1 |
|
22 |
=404; |
|
23 |
} |
|
24 |
|
|
25 |
|
|
26 |
location ~ ^/media/(.+)$ { |
|
27 |
alias /var/lib/u-auth/media/$1; |
|
28 |
} |
|
29 |
|
|
30 |
location / { |
|
31 |
proxy_pass http://unix:/var/run/u-auth/u-auth.sock; |
|
32 |
proxy_set_header Host $http_host; |
|
33 |
proxy_set_header X-Forwarded-SSL on; |
|
34 |
proxy_set_header X-Forwarded-Protocol ssl; |
|
35 |
proxy_set_header X-Forwarded-Proto https; |
|
36 |
proxy_set_header X-Real-IP $remote_addr; |
|
37 |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
|
38 |
} |
|
39 |
} |
|
40 |
|
|
41 |
server { |
|
42 |
listen 80; |
|
43 |
server_name u-auth.example.org; |
|
44 |
|
|
45 |
access_log /var/log/nginx/u-auth.example.org-access.log combined; |
|
46 |
error_log /var/log/nginx/u-auth.example.org-error.log; |
|
47 |
|
|
48 |
location ~ ^/static/(.+)$ { |
|
49 |
root /; |
|
50 |
try_files /var/lib/u-auth/static/$1 |
|
51 |
/var/lib/u-auth/collectstatic/$1 |
|
52 |
=404; |
|
53 |
} |
|
54 |
|
|
55 |
location ~ ^/media/(.+)$ { |
|
56 |
alias /var/lib/u-auth/media/$1; |
|
57 |
} |
|
58 |
|
|
59 |
location / { |
|
60 |
proxy_pass http://unix:/var/run/u-auth/u-auth.sock; |
|
61 |
proxy_set_header Host $http_host; |
|
62 |
proxy_set_header X-Real-IP $remote_addr; |
|
63 |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
|
64 |
} |
|
65 |
} |
debian/u-auth.install | ||
---|---|---|
11 | 11 |
debian/share/radius.ldif /usr/share/u-auth |
12 | 12 |
debian/share/ssl.pem /usr/share/u-auth |
13 | 13 |
debian/share/ssl.key /usr/share/u-auth |
14 |
debian/share/nginx-example.conf /usr/share/u-auth |
|
14 | 15 |
debian/settings.py /etc/u-auth |
15 | 16 |
debian/debian_config.py /usr/lib/u-auth |
Formats disponibles : Unified diff
debian: move nginx config example under 'share'