sudhakar selva
sudhakar selva

Reputation: 397

How to serve Static and Media files in Azure blob with gunicorn and nginx

I'm trying to upload my assets to Azure blob, in my local it's working. collectstatic saving the static files in Azure blob only. But when i'm running via gunicorn it's saving in my local. I didn't add any configuration for static and media in nginx.

nginx configuration:

server {
    listen 8000;
    server_name x.x.x.x:8000;


    location / {
        include proxy_params;
        proxy_read_timeout 300s;
        proxy_connect_timeout 300s;
        proxy_pass http://unix/home/myproject/project.sock;
    }
}

Upvotes: 2

Views: 1107

Answers (1)

Peter Pan
Peter Pan

Reputation: 24148

As I known, for the proxy_pass directive of module ngx_http_proxy_module, there are two types of URL path can be specified, a domain name or IP address url path, else or a UNIX-domain socket path, as below.

enter image description here

I see you were using a UNIX-domain socket path, but it seems not to be correct. Please refer to the related doc of proxy_pass directive to try to correct it and make it works.

Upvotes: -1

Related Questions