-
Notifications
You must be signed in to change notification settings - Fork 0
/
default
40 lines (36 loc) · 1.25 KB
/
default
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
40
## Basic reverse proxy server ##
upstream session1 {
server localhost:3000; #Apache1
}
upstream zob {
server localhost:3001; #Lighttpd1
}
## Start www.example.com ##
server {
#listen 202.54.1.1:80;
server_name www.listeur.xyz;
access_log /var/log/nginx/log/jpo.log main;
#error_log /var/log/nginx/log/www.example.error.log;
root /usr/share/nginx/html;
index index.html index.htm;
## send request back to apache1 ##
location /session1 {
proxy_pass http://session1;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_redirect off;
proxy_buffering off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /zob {
proxy_pass http://zob;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_redirect off;
proxy_buffering off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
## End www.example.com ##