Gunicorn is not binding my domain by using ".sock" file
<p>I am trying to host multiple sites on VPS using sock file but the problem is that I can't see the website up and running using gunicorn sock. But I can't see my website live. I need to know how do I change the following screen showing my app binds with particular port instead of sock file or if it has to be a sock file then why I can't see it in browser at mydomain.com.</p>

<p>Gunicorn upscript is as follows:</p>

<pre><code>#!/bin/bash

NAME="dressika"                                     # Name of the application
DJANGODIR=/django/mydomain      # Django project directory
SOCKFILE=/django/mydomain/run/gunicorn.sock         # we will communicte using this unix socket
USER=django                                         # the user to run as
GROUP=django                                        # the group to run as
NUM_WORKERS=3                                       # how many worker processes should Gunicorn spawn
DJANGO_SETTINGS_MODULE=mydomain.settings            # which settings file should Django use
DJANGO_WSGI_MODULE=mydomain.wsgi                    # WSGI module name

echo "Starting $NAME as `whoami`"

# Activate the virtual environment
cd $DJANGODIR
source ../bin/activate
export DJANGO_SETTINGS_MODULE=$DJANGO_SETTINGS_MODULE
export PYTHONPATH=$DJANGODIR:$PYTHONPATH

# Create the run directory if it doesn't exist
RUNDIR=$(dirname $SOCKFILE)
test -d $RUNDIR || mkdir -p $RUNDIR

# Start your Django Unicorn
# Programs meant to be run under supervisor should not daemonize themselves (do not use --daemon)
exec ../bin/gunicorn ${DJANGO_WSGI_MODULE}:application \
  --bind=unix:$SOCKFILE \
  --name $NAME \
  --workers $NUM_WORKERS \
  --user=$USER --group=$GROUP \
  --log-level=debug \
  --log-file=-
</code></pre>

<p>With above settings gunicorn startup script runs fine but I couldn't see my site live on browser or client end. I guess I need to bind it with some port. I am not sure if my assumption is correct. My app settings.py shows in <code>ALLOWED_HOSTS=['mydomain.com', 'www.mydomain.com]</code>. Still the url isn't working.</p>

<p>My Nginx settings are: </p>

<pre><code>upstream mydomain_server {
    server 127.0.0.1:9500 fail_timeout=0;

}


server {
    listen 80;
    listen [::]:80;


    root /home/django/mydomain;
    index index.html index.htm;

    client_max_body_size 4G;
    server_name mydomain.com www.mydomain.com;



    keepalive_timeout 5;

    location ~*  \.(jpg|jpeg|png|gif|ico|css|js|woff2|woff|ttf)$ {
        expires 365d;

    }



    # Your Django project's media files - amend as required
    location /media  {
        alias /home/django/mydomain/media/;
    }

    # your Django project's static files - amend as required
    location static/static-only {
        alias /home/django/mydomain/static-only/; 

    }
    # Django static images
    location /static/mydomain/images {
        alias /home/django/mydomain/static-only/images/;
    }


    # Proxy the static assests for the Django Admin panel
    location /static/admin {
       alias /usr/lib/python2.7/dist-packages/django/contrib/admin/static/admin;
    }

    location / {


        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        proxy_redirect off;
        proxy_pass http://mydomain_server;
        proxy_connect_timeout 60s;

    }
}
</code></pre>

<p>I've also tried binding <code>/home/django/mydomain/run/gunicorn.sock</code> with upstream server instead of IP:Port but still couldn't see the site up and running. </p>