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

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

    location /media/ {
        alias /srv/http/random23322/live/dynamic/public/;
        expires 7d;
#        include upload_folder_security_params;
    }
    location /static/ {
        alias /srv/http/random23322/live/static_collected/;
        expires 7d;
    }

    location / {
        proxy_pass http://django_server_random10305.example.org;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }

    access_log /var/log/nginx/access.log combined;
    error_log  /var/log/nginx/error.log;
}

server {
    listen 80;

    server_name random13399.example.org;
    server_name www.random10305.example.org;
    server_name random17958.example.org www.random17958.example.org;
    server_name random15266.example.org  www.random15266.example.org;
    server_name random21296.example.org  www.random21296.example.org;
    server_name random5261.example.org   www.random5261.example.org;
    server_name random679.example.org   www.random679.example.org;
    server_name random31788.example.org          www.random31788.example.org;
    server_name random22704.example.org         www.random22704.example.org;
    server_name random17411.example.org          www.random17411.example.org;

    return 301 http://random10305.example.org$request_uri;
}
