Better Stack Nginx logging

Start logging in 2 minutes

Collect logs and metrics from your Nginx webserver using Vector.

Select your platform:

Ubuntu • Debian

Install and configure Vector  on Ubuntu or Debian:

Set up Vector
curl -sSL https://logs.betterstack.com/setup-vector/nginx/$SOURCE_TOKEN \
  -o /tmp/setup-vector.sh && \
  bash /tmp/setup-vector.sh

Curious about what the script does?

  • Installs Vector using official package.
  • Configures Vector for your Better Stack source.
  • Enables and restarts Vector.

The script will ask for confirmation before making any changes.

You should see your logs in Better Stack → Live tail .

Check out your metrics in the Nginx dashboard .

Collecting metrics

To collect metrics from your Nginx web server you need to enable Nginx Stub Status module  in your config:

nginx.conf
location /nginx_status {
    stub_status on;
}

Need help?

Please let us know at hello@betterstack.com.
We're happy to help! 🙏

Additional information

  • Want to learn more about configuring Nginx access and error logs in production? Check out our Nginx logging tutorial.

  • Looking for manual instructions to set up Vector?
    Find step-by-step instructions in our dedicated Vector guide.