-
Notifications
You must be signed in to change notification settings - Fork 50
/
default.conf
76 lines (61 loc) · 1.79 KB
/
default.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
upstream tomcat_backend {
server 127.0.0.1:8888;
keepalive 32;
}
server {
listen 80 default_server;
server_name _;
index index.cfm index.html index.htm;
root /var/www;
server_name_in_redirect off;
# Rewrite rules and other criterias can go here
# Remember to avoid using if() where possible (http://wiki.nginx.org/IfIsEvil)
# location / {
# try_files $uri $uri/ @rewrites;
# }
# Can put some of your own rewrite rules in here
# for example rewrite ^/~(.*)/(.*)/? /users/$1/$2 last;
# location @rewrites {
# rewrite ^/(.*)? /index.cfm/$1 last;
# }
# block/ignore requests for Application.cfc/cfm
location ~* Application.cf[mc]$ {
return 404;
}
# block/ignore requests for /lucee-server
location ~* /lucee-server {
return 404;
}
# block/ignore CFIDE requests
location ~* /CFIDE {
return 404;
}
# block/ignore lucee cfchart rendering
location ~* /lucee/graph.cfm {
return 404; # cfchart disabled (default/recommended)
# try_files @lucee @lucee; # cfchart enabled
}
# block/ignore Lucee admin
location ~* /lucee/ {
return 404; # Lucee admin disabled (default/recommended)
# try_files @lucee @lucee; # Lucee admin enabled
}
location ~* \.(cfm$|cfc$|cfm\/) {
try_files @lucee @lucee;
}
location @lucee {
proxy_pass http://tomcat_backend;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_redirect off;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_connect_timeout 600;
proxy_send_timeout 600;
proxy_read_timeout 600;
send_timeout 600;
}
}