# GUNICORN Static Files ## Which server looks where ### development server `manage.py runserver` looks everywhere (e.g. for admin static files in .venv) ### gunicorn `gunicorn` looks in *staticfiles* if defined in `configs.py` by defining `STATIC_ROOT = BASE_DIR / "staticfiles"` ### nginx `nginx` needs definition in ``` location /static/ { alias /home/<user>/<dir>/<dir>/staticfiles/; } ``` - important are the slashes! :::info If access rights are missing: `sudo chmod o+x /home/<user>` should be enough ::: :::info add `staticfiles/` to `.gitignore` :::
