forked from flyerbee-com/heroku-buildpack-openresty
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf.template
52 lines (40 loc) · 1.08 KB
/
nginx.conf.template
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
# heroku wants you to run as a foreground process and not exit
daemon off;
worker_processes 1;
error_log stderr info;
env LUA_PATH;
env LUA_CPATH;
events {
worker_connections 1024;
}
http {
types {
text/html html;
text/css css;
application/javascript js;
}
server {
listen ${{PORT:-8080}};
# we use ${{PWD}} rather than ${{HOME}} because you might want to
# run this in a subdirectory on your local machine
root ${{PWD}}/html;
#location / {
# try_files $uri $uri.html $uri/index.html =404;
#}
# location where application is running
location / {
# Make sure we are using google DNS or http requests from lua will not work.
# Also, ipv6 must be disabled or it will try to use ipv6 connection address, which
# doesn't work from Heroku.
resolver 8.8.8.8 ipv6=off;
# custom lua code
# access_by_lua '';
# application must listen on port 8080
proxy_pass http://127.0.0.1:8080;
}
}
}
# Local Variables:
# tab-width: 2
# indent-tabs-mode: nil
# End: