Hi Maxim, thanks for getting back to me.
I've enabled debugging and the output is here: http://pastebin.com/Dmw2nJMY. I've cleared all caches and restarted varnish, nginx and php5-fpm and mysql.
I didn't explain myself very well earlier. The "fastcgi_param SERVER_PORT 80" does work for php pages (it's in my location ~ .php$ block) but the problem I'm having is with my server root.
http://site.com/page.php <-- works fine
http://site.com/ redirects to http://site.com:8080
http://site.com/index.php redirects to http://site.com:8080
One thing I noticed is "location /" block is used first, the index.php is tried, and then the "location ~ .php$" block processes this page. I would have thought that the SERVER_PORT would have rewritten the port used at this stage...?
Any help is greatly appreciated!
Thanks,
Olan