Scenario

The site answers 403 Forbidden

nginx is running, the configuration passes its check, and the address returns 403 instead of the page. Find out who is forbidden to do what.

Yesterday evening the team switched to a new deploy tool, and orders-api was the first thing to go through it: build 5120 landed in its own site directory, nginx was restarted, the chat said "done". By morning the monitoring is red: the address returns 403 Forbidden. The person who did the deploy is on vacation and unreachable, so it is yours to work out.

The symptom

The service is up, the configuration is clean, and the answer is a refusal. The nginx error log gets the same line on every request.

$ curl -si http://localhost/
HTTP/1.1 403 Forbidden
Server: nginx/1.24.0 (Ubuntu)
Date: Wed, 19 Aug 2026 03:58:16 GMT
Content-Type: text/html
Content-Length: 162
Connection: keep-alive

<html>
<head><title>403 Forbidden</title></head>
<body>
<center><h1>403 Forbidden</h1></center>
<hr><center>nginx/1.24.0 (Ubuntu)</center>
</body>
</html>

$ sudo service nginx status
 * nginx is running

$ sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

$ tail -n 1 /var/log/nginx/error.log
2026/08/19 03:58:16 [error] 37#37: *1 "/var/www/orders/index.html" is forbidden (13: Permission denied), client: ::1, server: _, request: "GET / HTTP/1.1", host: "localhost"

This is neither a 502 nor a 404: nginx found what to serve and refused. The log line names the pa

Free with account

Finish this lesson with a free account

This lesson is free once you sign in. Create an account to keep reading and open the lab.

Create a free account

Already have an account? Sign in