-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathofc_delivery
35 lines (27 loc) · 1.19 KB
/
ofc_delivery
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
upstream domain3 {
server 0.0.0.0:4747;
}
server {
listen 8888;
server_name localhost;
access_log /home/jamesh/public_html/ofc_delivery/log/access.log;
error_log /home/jamesh/public_html/ofc_delivery/log/error.log;
root /home/jamesh/public_html/ofc_delivery/jsfw/app/;
index index.html;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
if (-f $request_filename/index.html) {
rewrite (.*) $1/index.html break;
}
if (-f $request_filename.html) {
rewrite (.*) $1.html break;
}
if (!-f $request_filename) {
proxy_pass http://domain3;
break;
}
}
}