-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
49 lines (40 loc) · 1.22 KB
/
nginx.conf
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
48
49
# nginx.conf
# Set the user and group for Nginx to run under (optional)
user nginx;
worker_processes auto;
# Define the number of worker connections
events {
worker_connections 1024;
}
# Configure the HTTP server
http {
# Set the MIME type mappings
include /etc/nginx/mime.types;
# Set the default log format and location
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;
# Set the client request timeout
client_body_timeout 12;
client_header_timeout 12;
keepalive_timeout 15;
# Define the server block for your application
server {
# Listen on port 8080
listen 8080;
server_name node-docker-nginx-server;
# Set the root directory for serving static files
root /usr/share/nginx/html;
# Configure location directives for your application
location / {
proxy_pass http://nodejs:6379;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
# Handle other specific routes or proxy to backend server if needed
# location /api {
# proxy_pass http://backend-server:8000;
# }
}
}