-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnginx.conf
More file actions
29 lines (24 loc) · 900 Bytes
/
nginx.conf
File metadata and controls
29 lines (24 loc) · 900 Bytes
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
# Define the number of worker connections for the nginx server.
# This determines how many connections each worker process can handle.
events {
worker_connections 1024;
}
# Define the HTTP server block for the nginx server.
http {
# Define the server block for the HTTP server.
server {
# Listen on port 80.
listen 80;
# Define the server name as localhost.
server_name localhost;
# Define the location block for the /hello endpoint.
location /hello {
# Proxy requests to the backend server on port 8082.
proxy_pass http://my-python-app:8082;
# Set the host header to the original host.
proxy_set_header Host $host;
# Set the X-Real-IP header to the client's IP address.
proxy_set_header X-Real-IP $remote_addr;
}
}
}