I've nginx like a reverse proxy to apache serving static files for django sites. I've 3 django sites around the server which are working (and also have been employed by more than a year now) however when I consider adding a replacement either nginx or apache is serving among the ones that already exist.

For instance site A.com &lifier B.com happen to be around the server. I'm trying to include C.com. I replicated within the nginx/apache config files, linked them correctly and transformed the configurations inside them correctly, restarted nginx &lifier apache sucessfully without any errors however when I attempt to visit C.com it loads A.com! The DNS is proven to be accurate by Rackspace. I've looked within the log files without any apparent luck. I'm presuming this really is apache as it is really rendering the django code for any.org or could nginx be give apache the incorrect directive?

Also Cleaning it once a to unlink among the working sites which was pointed towards the new django code ("C.com", and dealing!) after which relink (increase sites-enabled) both in nginx &lifier apache also it too now won't work! It simply redirects or defaults to some.org.

I have been digging around google without any luck apart from apache/nginx defaults but nothing regarding how to fix this! Any help or direction could be appreciated!

Listed here are example nginx &lifier apache config files:

nginx

server {

    listen 111.111.111.111:80;
    server_name mynewdomain.com;
    rewrite ^/(.*) http://www.mynewdomain.com/$1 permanent;
}

server {
    listen 111.111.111.111:80;
    server_name www.mynewdomain.com;

    location / {
        proxy_pass http://127.0.0.1:8080/;
        include /etc/nginx/proxy.conf;
    }
    location /media {
        root /home/django/mynewdomain;
        expires 24h;
    }
}

apache:

<VirtualHost 127.0.0.1:8080>
    ServerName www.mynewdomain.com
    ServerAlias mynewdomain.com *.mynewdomain.com

    <Directory /home/django/mynewdomain/>
        Order deny,allow
        Allow from all
    </Directory>

    Loglevel warn
    CustomLog /var/log/apache2/mynewdomain.com.access.log combined
    ErrorLog /var/log/apache2/mynewdomain.com.error.log

    WSGIDaemonProcess mynewdomain.com user=www-data group=www-data threads=25
    WSGIProcessGroup mynewdomain.com
    WSGIScriptAlias / /home/django/mynewdomain/apache/django.wsgi

</VirtualHost>

Thanks ahead of time.

You're missing a line such as this inside your nginx config, you can put it any place in the server block:

proxy_set_header Host $host;