aufsetzen_raspberry_lokal
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| aufsetzen_raspberry_lokal [2026/06/12 20:55] – ninin | aufsetzen_raspberry_lokal [2026/06/12 21:52] (current) – ninin | ||
|---|---|---|---|
| Line 82: | Line 82: | ||
| ====15. Static Files==== | ====15. Static Files==== | ||
| python manage.py collectstatic | python manage.py collectstatic | ||
| + | |||
| + | Rechte für Nginx auf das staticfiles-Verzeichnis vergeben: | ||
| + | sudo chown -R :www-data [...]/ | ||
| + | sudo chmod -R 755 [...]/ | ||
| + | sudo chmod o+x / | ||
| | | ||
| ====16. Nginx==== | ====16. Nginx==== | ||
| Line 96: | Line 101: | ||
| | | ||
| location / { | location / { | ||
| - | proxy_pass http:// | + | proxy_pass http:// |
| proxy_set_header Host $host; | proxy_set_header Host $host; | ||
| proxy_set_header X-Real-IP $remote_addr; | proxy_set_header X-Real-IP $remote_addr; | ||
| Line 115: | Line 120: | ||
| sudo nginx -T | sed -n ' | sudo nginx -T | sed -n ' | ||
| + | ====17. Gunicorn==== | ||
| | | ||
| + | |||
| + | sudo nano / | ||
| + | |||
| + | content: | ||
| + | [Unit] | ||
| + | | ||
| + | Description=gunicorn daemon for Django | ||
| + | After=network.target | ||
| + | | ||
| + | [Service] | ||
| + | User=[SYSTEMUSER] | ||
| + | Group=www-data | ||
| + | RuntimeDirectory=gunicorn | ||
| + | WorkingDirectory=[...]/ | ||
| + | ExecStart=[...]/ | ||
| + | | ||
| + | [Install] | ||
| + | WantedBy=multi-user.target | ||
| + | |||
| + | Start and enable the service: | ||
| + | sudo systemctl start gunicorn | ||
| + | sudo systemctl enable gunicorn | ||
aufsetzen_raspberry_lokal.1781297725.txt.gz · Last modified: by ninin
