Example 16382

Nginx Snippet

Nginx server block as raw string configuration.

# Nginx configuration
{
name: "hasty-haircut.info"
# Server block
config: """
server {
listen 443 ssl http2;
server_name soupy-brief.com;

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

location / {
proxy_pass http://localhost:4779;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}

location /static/ {
root /var/www/html;
expires 30d;
}
}
"""

enabled: true
reload_command: "nginx -t && systemctl reload nginx"
}

See also