-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnginx.conf
More file actions
60 lines (48 loc) · 1.21 KB
/
nginx.conf
File metadata and controls
60 lines (48 loc) · 1.21 KB
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
worker_processes 2;
events {
worker_connections 1024;
}
env LUA_PATH;
env LUA_CPATH;
env WEBB_DIR;
http {
access_log off;
include mime.types;
default_type application/octet-stream;
# this will stay off for a looong time.
lua_code_cache off;
server {
include nginx-*.conf;
# compress all text data
gzip on;
gzip_min_length 1000;
gzip_types text/plain;
gzip_types application/json;
gzip_types application/javascript;
gzip_types text/css;
# serve static files first and fallback to Lua scripts
location / {
root www;
try_files $uri @lua;
}
# hide source code
location ~ \.(lua|lp|cat|mu)$ {
default_type text/html;
content_by_lua_file 'www/ngx.lua';
}
# serve all dynamic content through a single Lua entry-point
location @lua {
default_type text/html;
content_by_lua_file 'www/ngx.lua';
}
# prevent opening our URLs in frames.
add_header X-Frame-Options DENY;
# prevent browsers from opening resources with wrong mime types.
add_header X-Content-Type-Options nosniff;
}
client_body_temp_path tmp/client-body;
proxy_temp_path tmp/proxy;
fastcgi_temp_path tmp/fastcgi;
uwsgi_temp_path tmp/uwsgi;
scgi_temp_path tmp/scgi;
}