0:00–0:10
Recap
0:10–1:45
Capstone
1:45–2:00
Debrief
0:00 – 0:10Recap · 10 min

Map the full chain before writing a single line of config

0:10 – 1:45Capstone Lab · 95 min

Lab 6D — Deploy a Docker web app, proxy through Nginx, wire up DNS

Part 1 — Deploy the Docker web application (20 min)

Part 2 — Add a DNS record for app.yourname.net (15 min)

Part 3 — Configure Nginx reverse proxy for app.yourname.net (30 min)

Part 4 — End-to-end verification (30 min)

Capstone complete when: app.yourname.net DNS record resolves. http://app.yourname.net redirects to HTTPS. https://app.yourname.net shows the "Served from Docker" page. Access log shows entries. docker-compose logs shows the container received the request. All verified live.
1:45 – 2:00Debrief · 15 min

Course arc reflection and Week 7 preview

Learning outcomes — by end of Day 4, students can…

Configure Nginx as a reverse proxyWrite a proxy_pass location block with correct proxy headers and verify requests reach the backend container
Add a DNS record for a containerised serviceUpdate both internal and external zone files with a new A record, increment the serial, and verify resolution
Verify an end-to-end service chainConfirm each layer (DNS → Nginx → proxy_pass → Docker) is working using targeted diagnostic commands
Read proxy logs for both Nginx and DockerIdentify which layer handled a request by reading access.log and docker-compose logs simultaneously

Common issues and fixes

IssueLikely causeFix
Nginx returns 502 Bad GatewayDocker container not running, or proxy_pass pointing to wrong portCheck: docker-compose ps — is the app service Up? Check: curl http://localhost:8080 — does it return the app page directly? If not, container issue. If yes, proxy_pass port is wrong in the Nginx config
Browser shows yourname.net page instead of app pageserver_name in the app.yourname.net block doesn't match the hostname, or symlink not createdCheck: sudo nginx -T | grep server_name — app.yourname.net should appear. Check: ls /etc/nginx/sites-enabled/ — symlink should exist
DNS record for app.yourname.net not resolvingSerial number not incremented, or named not reloaded after zone file changeVerify serial is higher than before in the zone file. Reload: sudo systemctl reload named. Check: dig @192.168.50.1 app.yourname.net
← Day 3 Lab 6D Handout Day 5 →