-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsubdomain_nginx
40 lines (35 loc) · 1.02 KB
/
subdomain_nginx
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
upstream employees {
server 127.0.0.1:8002;
}
server {
listen 80;
server_name radiant-employees.mertd.com;
client_max_body_size 25M;
root /home/employees/www/employees/current/public/;
access_log /home/employees/www/employees/current/log/access.log main;
if (-f $document_root/system/maintenance.html) {
rewrite ^(.*)$ /system/maintenance.html last;
break;
}
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 false;
proxy_max_temp_file_size 0;
if (-f $request_filename) {
break;
}
if (-f $request_filename/index.html) {
rewrite (.*) $1/index.html break;
}
if (!-f $request_filename) {
proxy_pass http://employees;
break;
}
}
error_page 500 502 503 504 /500.html;
location = /500.html {
root /home/employees/www/employees/current/public;
}
}