NGINX /etc/nginx/snippets/snakeoil.conf

Original 📋 Debian 9 (Stretch) 5 lines

Works On

Viewing:
Debian 9 (Stretch)
Same on:
Debian 10 (Buster) Debian 11 (Bullseye) Debian 12 (Bookworm) Debian 13 (Trixie) Ubuntu 18.04 LTS (Bionic Beaver) Ubuntu 20.04 LTS (Focal Fossa) Ubuntu 22.04 LTS (Jammy Jellyfish) Ubuntu 24.04 LTS (Noble Numbat)
Other versions:

Details

Size
5 lines
MD5
0a8bff8a55d8ec9d002e1b8460d2d64f
SHA256
69de463039725a6636b5a3ca87a0968dde646279bc8bb4419d200f547448a55a
/etc/nginx/snippets/snakeoil.conf
# Self signed certificates generated by the ssl-cert package
# Don't use them in a production server!

ssl_certificate /etc/ssl/certs/ssl-cert-snakeoil.pem;
ssl_certificate_key /etc/ssl/private/ssl-cert-snakeoil.key;

Copy & Paste

curl:
curl https://exampleconfig.com/api/v1/config/original/0a8bff8a55d8ec9d002e1b8460d2d64f?hint=snakeoil.conf
wget:
wget -O snakeoil.conf https://exampleconfig.com/api/v1/config/original/0a8bff8a55d8ec9d002e1b8460d2d64f?hint=snakeoil.conf

For AI Agents

<prompt><role>DevOps agent</role><source url='https://exampleconfig.com/api/v1/config/original/0a8bff8a55d8ec9d002e1b8460d2d64f?hint=snakeoil.conf' /><config><app>NGINX</app><os>Debian 9 (Stretch)</os><location>/etc/nginx/snippets/snakeoil.conf</location><lines>5</lines><md5>0a8bff8a55d8ec9d002e1b8460d2d64f</md5><sha256>69de463039725a6636b5a3ca87a0968dde646279bc8bb4419d200f547448a55a</sha256></config></prompt>

Paste into Claude, ChatGPT, or any AI assistant.

Install NGINX

Alpine Linux

sudo apk add nginx

Debian

sudo apt update && sudo apt install nginx

Red Hat Enterprise Linux

sudo yum install nginx

Ubuntu

sudo apt update && sudo apt install nginx

File Location

File Path
/etc/nginx/snippets/snakeoil.conf
Directory
/etc/nginx/snippets/
Significance
System-wide configuration directory
Description
Files in /etc/ contain system-wide configuration settings that affect all users.

FAQ

When should I use this snakeoil.conf?

Use it to restore a missing default, confirm what shipped, or diff against your current NGINX config.

How do I restore NGINX defaults?

Download the file, back up the current one in /etc/nginx/snippets/snakeoil.conf, replace it, then reload or restart NGINX.

Is snakeoil.conf safe for production?

It is the vendor default for Debian 9 (Stretch). Treat it as a baseline and review security and performance settings before production use.

How does this differ from other OS versions?

Defaults vary by distro and version. This copy matches Debian 9 (Stretch).

Can I use this for NGINX troubleshooting?

Yes. Diff it against yours to find drift, then restore only the sections you need.