-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnginx.conf
More file actions
47 lines (43 loc) · 1.04 KB
/
nginx.conf
File metadata and controls
47 lines (43 loc) · 1.04 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
daemon off;
user www-data;
worker_processes 4;
pid /run/nginx.pid;
env AWS_ACCESS_KEY_ID;
env AWS_SECRET_ACCESS_KEY;
events {
worker_connections 2048;
multi_accept on;
use epoll;
}
http {
include mime.types;
include nginx/conf.d/*.conf;
server_tokens off;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 30;
types_hash_max_size 2048;
client_body_buffer_size 20M;
client_max_body_size 20M;
default_type application/octet-stream;
gzip on;
gzip_disable "msie6";
open_file_cache max=100;
charset UTF-8;
lua_package_path ";;$prefix/?.lua;";
server {
listen __LOCAL_PORT__;
server_name localhost;
location / {
resolver 8.8.8.8;
set $aws_host __REMOTE_HOST__;
set $aws_uri $request_uri;
access_by_lua "local aws = require 'resty.aws'; aws.aws_set_headers(ngx.var.aws_host, ngx.var.aws_uri)";
proxy_http_version 1.1;
proxy_set_header Connection "Keep-Alive";
proxy_set_header Proxy-Connection "Keep-Alive";
proxy_pass http://$aws_host$aws_uri;
}
}
}