37 lines
1.0 KiB
Nginx Configuration File
37 lines
1.0 KiB
Nginx Configuration File
server {
|
|
# listen 443 ssl;
|
|
# listen 80 ssl;
|
|
# listen 443 ssl;
|
|
# listen ${NGINX_PORT};
|
|
listen 8080;
|
|
|
|
location /{
|
|
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;
|
|
proxy_pass http://react_app:8081;
|
|
}
|
|
|
|
location /api {
|
|
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;
|
|
proxy_pass http://api:3000/api;
|
|
}
|
|
|
|
location /socket.io {
|
|
# Forward requests to socket server running on port 4001
|
|
if ($request_uri ~ ^/socket/4001) {
|
|
proxy_pass http://chat:4001;
|
|
break;
|
|
}
|
|
|
|
# Forward requests to socket server running on port 4000
|
|
if ($request_uri ~ ^/socket/4000) {
|
|
proxy_pass http://pong:4000;
|
|
break;
|
|
}
|
|
}
|
|
} |