Example 13298

Nginx Snippet

Nginx server block as raw string configuration.

# Nginx configuration
{
name: "complicated-hydrolyze.com"
# Server block
config: """
server {
listen 443 ssl http2;
server_name potable-hubris.name;

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

location / {
proxy_pass http://localhost:8426;
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