41 lines
922 B
Nginx Configuration File
41 lines
922 B
Nginx Configuration File
user nginx;
|
|
worker_processes 1;
|
|
error_log /var/log/nginx/error.log warn;
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
http {
|
|
upstream backend {
|
|
server backend:5000;
|
|
}
|
|
|
|
include /etc/nginx/mime.types;
|
|
default_type application/octet-stream;
|
|
log_format main 'access_log $remote_addr "$request" '
|
|
'$status "$http_user_agent"';
|
|
|
|
access_log /var/log/nginx/access.log main;
|
|
|
|
sendfile on;
|
|
|
|
keepalive_timeout 65;
|
|
|
|
|
|
server {
|
|
listen 80 default_server;
|
|
listen [::]:80;
|
|
server_name backend;
|
|
|
|
location /api/ {
|
|
proxy_pass http://backend/;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
}
|
|
location / {
|
|
root /var/www/html;
|
|
index index.html;
|
|
}
|
|
}
|
|
} |