docker-hy.github.io icon indicating copy to clipboard operation
docker-hy.github.io copied to clipboard

Proposal, ex2.8: clarify trailing slash backend_connection_url

Open protofarer opened this issue 4 years ago • 0 comments

I embarrassingly spent too many hours to count troubleshooting why my backend didn't respond to /api/ping through the frontend. Depending on course philosophy, it may be advisable to clarify the information block about the backend in exercise 2.8, specifically:

"It might be nginx configuration problem: Add trailing / to the backend url in the nginx.conf."

I misread this as meaning the location block's prefix pattern /api/ 's trailing slash. Indeed, without much knowledge about how NGINX conf flow works, I didn't make the (obvious in retrospect) connection with _backend_connection_url_. While the learning experience of tinkering with nginx.conf and solidifying my understanding of docker-compose networks was very useful (paralleling what real-world problem-solving is like), this may slow down desired progression rate for the student.

Suggestion: Make the ex2.8 information block more explicit, eg:

Option 1: "Ensure there is a trailing / on the backend url as specified under the location /api/ context in the nginx.conf."

Option 2: "Ensure there is a trailing / on _backend_connection_url_ in the nginx.conf."

Thanks! ~k

protofarer avatar Feb 06 '22 17:02 protofarer