While authenticating via OAuth, Facebook is redirecting to localhost instead of to my domain. I'm using django-allauth for facebook authentication. Someone at GitHub pointed out that the error could be in the Nginx configuration. I'm pasting my nginx configuration below:
server { # simple reverse-proxy
listen 80;
server_name subdomain.domain.com;
access_log logs/site.access.log;
# serve static files
location ~ ^/static/ {
root /home/user_name/site_assets/;
expires 30d;
}
# serve media files
location ~ ^/media/(images|javascript|js|css|flash|img)/ {
root /home/user_name/site_assets/;
expires 30d;
}
# pass requests for dynamic content to rails/turbogears/zope, et al
location / {
proxy_pass http://localhost:8000;
}
}
Could someone please clarify what I'm missing here?