Don't think I ever used alias for this.
You could try something like this (works for me - this is a cut and paste
of an existing working config) though you may be a little more constrained
with names of directories:
server {
[... elided]
location / {
location ~ /static/ {
@Prosper,
I installed whitenoise at some point, but later removed its configuration.
On Thu, Apr 27, 2023 at 8:11 AM Prosper Lekia
wrote:
> Is whitenoise installed and added to MiddleWare?
>
> On Thu, Apr 27, 2023, 00:37 David Nugent wrote:
>
>> Ensure that nginx is correctly configured, since
Thanks for your response @David.
Here is my nginx configuration.[image:
1c9b64ec-c74f-4004-8b8d-9a6e7a3d8069.png]
Pointed it to staticfiles after running collectstatic files command.
On Thu, Apr 27, 2023 at 8:11 AM Prosper Lekia
wrote:
> Is whitenoise installed and added to MiddleWare?
>
> On Th
Is whitenoise installed and added to MiddleWare?
On Thu, Apr 27, 2023, 00:37 David Nugent wrote:
> Ensure that nginx is correctly configured, since from what you have
> provided the django configuration looks correct (although I generally use
> /static/ as STATIC_URL - with the leading / but sho
Ensure that nginx is correctly configured, since from what you have
provided the django configuration looks correct (although I generally use
/static/ as STATIC_URL - with the leading / but should work as you have
it). Check the nginx error log to try to discover the cause of the 404s. I
suspect th
Hello everyone,
I am deploying a django project to a dedicated server.
I have set nginx to find static files in this file "staticfiles".
This is the setting in settings.py file:
STATIC_ROOT = BASE_DIR / 'staticfiles'
STATIC_URL = 'static/'
After running collectstatic command, my project can't st
6 matches
Mail list logo