upstream django_server_random22047.example.org {
    server unix:/srv/http/random26975/acceptance/website.sock;
}

server {
    listen 80;
    server_name random22047.example.org;

    location /media/ {
        alias /srv/http/random26975/acceptance/dynamic/public/;
        expires 7d;
    }
    location /static/ {
        alias /srv/http/random26975/acceptance/static_collected/;
        expires 7d;
    }

    location / {
#        proxy_pass http://django_server_random22047.example.org;
        include          /etc/nginx/django_proxy_params;

        satisfy any;
        auth_basic           'acceptance for random26975';
        auth_basic_user_file /srv/http/random26975/acceptance/htpasswords;
#        include              /etc/nginx/allow_ytec_ips_params;
        deny all;
    }

    access_log /var/log/nginx/access_log;
    error_log  /var/log/nginx/error_log;
}

server {
    server_name www.random22047.example.org;
    return 301 http://random22047.example.org$request_uri;
}
