Closed bilalmalik777 closed 11 months ago
I want to run my asp.net application at nginx server, But I am facing the following error in dev environment "502 Bad Gateway". Information of docker compose and nginx is given below respectively
`version: '3.4'
services: webapplication1: image: ${DOCKER_REGISTRY-}webapplication1 build: context: . dockerfile: WebApplication1/Dockerfile expose:
app-network
db1: image: microsoft/mssql-server-linux container_name: db1 environment: SA_PASSWORD: "Thingtrax%1" ACCEPT_EULA: "Y" MSSQL_PID: Express ports:
web_nginx: image: nginx ports:
networks: app-network: ipam: driver: default config:
nginx.conf###
worker_processes 4;
events { worker_connections 1024; }
http { sendfile on;
upstream webapplication { server webapplication1:5050; } server { listen 80; location / { proxy_pass http://webapplication; proxy_redirect http://localhost http://webapplication; 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-Host $server_name; } }
}
Please help me to solve this issue
I want to run my asp.net application at nginx server, But I am facing the following error in dev environment "502 Bad Gateway". Information of docker compose and nginx is given below respectively
-------docker compose ----------
`version: '3.4'
services: webapplication1: image: ${DOCKER_REGISTRY-}webapplication1 build: context: . dockerfile: WebApplication1/Dockerfile expose:
app-network
db1: image: microsoft/mssql-server-linux container_name: db1 environment: SA_PASSWORD: "Thingtrax%1" ACCEPT_EULA: "Y" MSSQL_PID: Express ports:
web_nginx: image: nginx ports:
networks: app-network: ipam: driver: default config:
nginx.conf###
worker_processes 4;
events { worker_connections 1024; }
http { sendfile on;
}
Please help me to solve this issue