Linux Labs

Web stack / Stage 1 of 9

How nginx picks a site and a file

Not running Starting usually ~20 s
Leave the lesson

Step 5 of 7 · on a machine · 4 min

A third site

Here you bring up a site from scratch yourself — from the server block to an answer by name.

The operations team needs a status page at status.lab.test. The page is already on the server, the name leads to this machine, and the portal must stay the default site.

Note

The portal's block is a handy model, but a port has one default_server. With two copies of the parameter nginx -t refuses with a duplicate default server for 0.0.0.0:80.

Exercise · do it

Bring up a third site

Bring up the site status.lab.test: its page is /srv/www/status/index.html, and the name already leads to this machine. The portal stays the default site.

Sign in and start The machine is available after signing in

Goals · 0 of 2

  • Open the status page by the name status.lab.test not done yet
  • Keep the portal as the default site not done yet

Step goals

0 of 2
  • Open the status page by the name status.lab.test — not done yet
  • Keep the portal as the default site — not done yet
Ubuntu 24.04

Step goals

0 of 2
  • Open the status page by the name status.lab.test — not done yet
  • Keep the portal as the default site — not done yet
Loading…