# Troubleshooting Nginx Bad Gateway Error in Docker Composition

**URL:** <https://speciforum.org/t/troubleshooting-nginx-bad-gateway-error-in-docker-composition/1341>\
**Category:** Get Help\
**Created:** [October 2, 2023, 1:57am UTC](https://speciforum.org/t/troubleshooting-nginx-bad-gateway-error-in-docker-composition/1341 "2023-10-02T01:57:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![drguiritan](https://avatars.discourse-cdn.com/v4/letter/d/dbc845/32.png) [@drguiritan](https://speciforum.org/u/drguiritan)\
**Post date:** [October 2, 2023, 1:57am UTC](https://speciforum.org/t/troubleshooting-nginx-bad-gateway-error-in-docker-composition/1341/1 "2023-10-02T01:57:40Z")

</div>

> 💬 Originally posted in #get-help::channel, moved by @Specify

I’ve tried the docker composition with option all in one. I’m able to start all the container on my VM with docker but it says Nginx Bad gate way accessing on the web-browser. Any help or tips

/docker-entrypoint.sh: Configuration complete; ready for start up  
2023/10/01 12:08:26 [emerg] 1#1: host not found in resolver “set” in /etc/nginx/conf.d/default.conf:30  
nginx: [emerg] host not found in resolver “set” in /etc/nginx/conf.d/default.conf:30

docker logs

keep restarting

 ![restart](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/3/32c9f5086d87302e647a9d9d2a4c03aa3a8d8969.png)

---

<div class="post-metadata">

**Author:** ![Grant](https://yyz1.discourse-cdn.com/flex029/user_avatar/speciforum.org/grant/32/4255_2.png) [@Grant](https://speciforum.org/u/Grant)\
**Post date:** [October 2, 2023, 2:02am UTC](https://speciforum.org/t/troubleshooting-nginx-bad-gateway-error-in-docker-composition/1341/2 "2023-10-02T02:02:28Z")

</div>

Hi @drguiritan,  
Could you please provide a copy of your `docker-compose.yml` file?  
It seems that there might be a misconfiguration causing this issue.

Thank you!

---

<div class="post-metadata">

**Author:** ![drguiritan](https://avatars.discourse-cdn.com/v4/letter/d/dbc845/32.png) [@drguiritan](https://speciforum.org/u/drguiritan)\
**Post date:** [October 2, 2023, 2:13am UTC](https://speciforum.org/t/troubleshooting-nginx-bad-gateway-error-in-docker-composition/1341/3 "2023-10-02T02:13:17Z")

</div>

here are the attached files which references to the error on testing docker base installation specifically on all-in-one composition.

\*\*for docker logs on container with status restarting… \*\*

 ![e1](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/3/36dbe166b42cbfd41832ee12fbabc1d1374433a3.png)  
 ![e2](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/d/ddd93949224233fce7f5783d9ed141778b056ec4.png)

\*\*for the yaml file and other configurations \*\*

 ![docker-compose](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/6/65e2c5d5fc464ff8eb787023993c80917c96b843.png)  
 ![other-configuration](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/7/724113161b26a69296da218c665c60c3fd579718.png)

---

<div class="post-metadata">

**Author:** ![vinayakjha](https://avatars.discourse-cdn.com/v4/letter/v/b9bd4f/32.png) [@vinayakjha](https://speciforum.org/u/vinayakjha)\
**Post date:** [October 2, 2023, 2:40am UTC](https://speciforum.org/t/troubleshooting-nginx-bad-gateway-error-in-docker-composition/1341/4 "2023-10-02T02:40:00Z")

</div>

There appears to be a typo in `location /` block (the last block of nginx configuration). The line `resolver 127.0.0.11 valid=30s` is missing a semicolon at the end. Everything else looks correct. Can you retry after fixing that?
