location / {
proxy_pass http://127.0.0.1:3000;
}
location /api/v1 {
proxy_pass http://127.0.0.1:8080;
}
location /admin {
proxy_pass http://127.0.0.1:3001;
}
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include 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 logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
send_timeout 300;
proxy_read_timeout 300;
proxy_connect_timeout 300;
gzip on;
gzip_vary on;
gzip_min_length 10240;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/xml application/json;
server {
listen 80;
if ($scheme = https) {
return 301 http://$host$request_uri;
}
}
server {
listen 80;
server_name localhost ************ 127.0.0.1;
add_header Last-Modified $date_gmt;
add_header Cache-Control 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
if_modified_since off;
expires off;
etag off;
location / {
root /usr/share/nginx/html/;
index index.html;
}
location /api {
proxy_pass http://rest:8080/api;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-for $remote_addr;
proxy_redirect off;
}
}
}