upstream django_server_random25771.example.org {
    server unix:/srv/http/random4711/live/website.sock;
}

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

    location ^~ /media/ {
        alias /srv/http/random4711/live/dynamic/public/;
        expires 7d;
    }
    location ^~ /static/ {
        alias /srv/http/random4711/live/static_collected/;
        expires 7d;
    }

    location / {
        proxy_pass http://django_server_random25771.example.org;
        include          /etc/nginx/proxy_params;
        proxy_read_timeout 4m;

        # You can configure access rules here
    }

    client_max_body_size 25m;

    access_log /var/log/nginx/random4711/live/access.log combined_plus;
    error_log  /var/log/nginx/random4711/live/error.log;
}

server {
    server_name www.random25771.example.org;
    server_name *.random17707.example.org;
    server_name *.random22274.example.org;
    server_name *.random26333.example.org; 
    server_name *.random10742.example.org;
    server_name *.random8297.example.org;
    server_name *.random18250.example.org;
    server_name *.random30184.example.org;
    server_name *.random27005.example.org;
    server_name *.random12286.example.org;
    server_name *.random28076.example.org; 
    server_name *.random26194.example.org;
    rewrite ^ http://random25771.example.org$request_uri permanent;
}
