-
Notifications
You must be signed in to change notification settings - Fork 0
/
localhost.conf
36 lines (29 loc) · 940 Bytes
/
localhost.conf
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
server {
server_name localhost;
auth_request /oauth2/auth;
# sign in, pass on request uri
error_page 401 = /oauth2/start?rd=$request_uri;
# Alternative: Show login page (move second line into oauth2 location block)
# error_page 401 =307 http://$host:$server_port/oauth2/sign_in?rd=$request_uri;
# proxy_set_header X-Auth-Request-Redirect $arg_rd;
location /oauth2 {
auth_request off;
proxy_pass http://oauth2_proxy:4180;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_connect_timeout 1;
proxy_send_timeout 30;
proxy_read_timeout 30;
}
location / {
root /data/www;
}
}
# Do not require signin if subdomain is accessed
server {
server_name secured.localhost;
location / {
root /data/www;
}
}