application working with php

This commit is contained in:
2026-03-15 10:22:30 -07:00
parent 702a5e99a4
commit 8787a1ee2a
8 changed files with 98 additions and 44 deletions

View File

@ -11,30 +11,30 @@ listen 80;
server_name localhost;
# --------------------------------------------------------------------
# Proxy everything under "/" to the Node backend
# Proxy everything under "/" to the php server backend
# --------------------------------------------------------------------
location / {
proxy_pass http://172.17.0.1:3000;
proxy_pass http://192.168.37.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
# ----- Custom Nginx Configuration (inside <location> block) -----
location /socket.io/ {
# Forward to the Node WS server
proxy_pass http://192.168.37.1:3000; # or <node_container_ip>
# --------------------------------------------------------------------
# Proxy everything under "/history" to the Apache backend
# This is off for now
# --------------------------------------------------------------------
#location /history/ {
# proxy_pass http://172.17.0.1:8080/;
# proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
#}
# Keep WebSocket upgrade headers
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
# Optional: pass on other headers you care about
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;
}
# Optional: If you want `/history` (without trailing slash) to be
# redirected to `/history/`:
#location = /history {
# return 301 /history/;
#}
}