Browse Source

Add nginx.conf for Docker container

tags/v2.3.0
Konstantin Nazarov 3 years ago
parent
commit
554061cc36
2 changed files with 52 additions and 0 deletions
  1. 32
    0
      nginx.conf
  2. 20
    0
      nginx.vh.default.conf

+ 32
- 0
nginx.conf View File

@@ -0,0 +1,32 @@
user nginx;
worker_processes 1;

error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;


events {
worker_connections 1024;
}


http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

access_log /var/log/nginx/access.log main;

sendfile on;
#tcp_nopush on;

keepalive_timeout 65;

#gzip on;

include /etc/nginx/conf.d/*.conf;
}


+ 20
- 0
nginx.vh.default.conf View File

@@ -0,0 +1,20 @@
upstream backend {
# Tarantool hosts
server 127.0.0.1:9999;
}

server {
listen 80;
server_name localhost;
location /tnt_rest {
# REST mode on
tnt_http_rest_methods get post put delete; # or all

# Pass http headers and uri
tnt_pass_http_request on;

# Module on
tnt_pass backend;
}
}

Loading…
Cancel
Save