Skip to content

Commit 554061c

Browse files
author
Konstantin Nazarov
committed
Add nginx.conf for Docker container
1 parent d220f33 commit 554061c

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

nginx.conf

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
user nginx;
2+
worker_processes 1;
3+
4+
error_log /var/log/nginx/error.log warn;
5+
pid /var/run/nginx.pid;
6+
7+
8+
events {
9+
worker_connections 1024;
10+
}
11+
12+
13+
http {
14+
include /etc/nginx/mime.types;
15+
default_type application/octet-stream;
16+
17+
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
18+
'$status $body_bytes_sent "$http_referer" '
19+
'"$http_user_agent" "$http_x_forwarded_for"';
20+
21+
access_log /var/log/nginx/access.log main;
22+
23+
sendfile on;
24+
#tcp_nopush on;
25+
26+
keepalive_timeout 65;
27+
28+
#gzip on;
29+
30+
include /etc/nginx/conf.d/*.conf;
31+
}
32+

nginx.vh.default.conf

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
upstream backend {
2+
# Tarantool hosts
3+
server 127.0.0.1:9999;
4+
}
5+
6+
server {
7+
listen 80;
8+
server_name localhost;
9+
10+
location /tnt_rest {
11+
# REST mode on
12+
tnt_http_rest_methods get post put delete; # or all
13+
14+
# Pass http headers and uri
15+
tnt_pass_http_request on;
16+
17+
# Module on
18+
tnt_pass backend;
19+
}
20+
}

0 commit comments

Comments
 (0)