UNPKG

genericsuite-be-scripts

Version:
39 lines (32 loc) 1.53 kB
# Define HTTP server server { listen 80; server_name app.APP_NAME_LOWERCASE_placeholder.local; # Replace with your domain or IP address access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log; location / { proxy_pass http://backend:8000; # Name of your Python backend container proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } } # Define HTTPS server server { listen 443 ssl; server_name app.APP_NAME_LOWERCASE_placeholder.local; # Replace with your domain or IP address ssl_certificate /etc/nginx/ssl/app.APP_NAME_LOWERCASE_placeholder.local.crt; # Path to your SSL certificate ssl_certificate_key /etc/nginx/ssl/app.APP_NAME_LOWERCASE_placeholder.local.key; # Path to your SSL certificate key ssl_client_certificate /etc/nginx/ssl/ca.crt; # Path to your CA certificate # ssl_trusted_certificate /etc/nginx/ssl/app.APP_NAME_LOWERCASE_placeholder.local.chain.crt; # Path to your SSL certificate chain access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log; location / { proxy_pass http://backend:8000; # Name of your Python backend container proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } }