summaryrefslogtreecommitdiffstats
path: root/nginx.conf.example
blob: a7c57ec4b284c13e8818ebe37f5f131cefefdd3b (plain)
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
server {
	listen 80;
        server_name  univnautes-idp.dev.entrouvert.org;

        location /static/ {
                alias /home/thomas/univnautes-idp/static/;
	}

        location / {
             proxy_pass         http://unix:/var/tmp/univnautes-idp.sock;
             proxy_set_header   Host $http_host;
             proxy_set_header   X-Forwarded-SSL on;
             proxy_set_header   X-Forwarded-Protocol ssl;
             proxy_set_header   X-Forwarded-Proto https;
        }
}

server {
	listen 80;
        server_name  ~^(?<site>.+)$;

        location /static/ {
             root /home/thomas/univnautes-idp/;
             try_files /tenants/$site$uri $uri =404;
	}

        location / {
             proxy_pass         http://unix:/var/tmp/univnautes-idp.sock;
             proxy_set_header   Host $http_host;
             proxy_set_header   X-Forwarded-SSL on;
             proxy_set_header   X-Forwarded-Protocol ssl;
             proxy_set_header   X-Forwarded-Proto https;
        }
}