diff --git a/checkin-app.service.example b/checkin-app.service.example index 1191257..002a914 100644 --- a/checkin-app.service.example +++ b/checkin-app.service.example @@ -29,6 +29,8 @@ Wants=network-online.target [Service] Type=forking +# CHANGE THIS: Replace with your actual username +User=username # CHANGE THIS: Replace with your actual installation path # Example: /home/username/CheckInApp @@ -44,8 +46,8 @@ ExecStart=/path/to/CheckInApp/manage.sh start backend ExecStop=/path/to/CheckInApp/manage.sh stop backend # Restart policy -Restart=always -RestartSec=10 +Restart=on-failure +RestartSec=10s # Kill settings KillSignal=SIGTERM diff --git a/nginx.conf.example b/nginx.conf.example index 914ec5c..ead052e 100644 --- a/nginx.conf.example +++ b/nginx.conf.example @@ -41,19 +41,22 @@ server { # ========================================== location /api/ { # Proxy to backend FastAPI server - proxy_pass http://127.0.0.1:8000; + proxy_pass http://localhost:8000/api/; # Proxy headers - proxy_set_header Host $host; + proxy_set_header Host $host:$server_port; 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; + proxy_set_header X-Forwarded-Host $host:$server_port; # HTTP version and buffering proxy_http_version 1.1; proxy_buffering off; proxy_request_buffering off; + proxy_redirect off; + # Timeouts proxy_connect_timeout 60s; proxy_send_timeout 60s;