Jul 22 - Initial code
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
[Unit]
|
||||
Description=JQC Features marketing site (Gunicorn)
|
||||
After=network.target mysql.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=jqcweb
|
||||
Group=jqcweb
|
||||
WorkingDirectory=/opt/jqc-features
|
||||
EnvironmentFile=/opt/jqc-features/.env
|
||||
ExecStart=/opt/jqc-features/venv/bin/gunicorn -c gunicorn.conf.py
|
||||
Restart=on-failure
|
||||
RestartSec=3
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,21 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name features.ltservicesinc.com; # <-- change to your domain
|
||||
|
||||
# Serve static assets directly from Nginx (faster than proxying).
|
||||
location /static/ {
|
||||
alias /opt/jqc-features/static/;
|
||||
expires 7d;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8000;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
# After DNS points at this box, add TLS with: sudo certbot --nginx -d features.ltservicesinc.com
|
||||
Reference in New Issue
Block a user