Forgive me if this is an easy question, all... I've spent an hour Googling this and can't come up with an answer that makes sense.
MY SETUP: Wordpress running on nginx with varnish Varnish listening on 80 Nginx listening on 8080
MY ISSUE: On my WP site, if someone clicks the "Log In With Facebook" button from "mysite.com/somepage", after a long wait, the browser bar shows "mysite.com:8080/somepage/ and I'm getting that fun "Oops! Google Chrome could not connect" error.
From what I've read, I get the sense that the issue is with my nginx.conf, but I haven't the slightest idea how to fix it; and it's on a live site, so monkeying around nailing Jell-O to the wall isn't something I'm comfy with. And I'm not even 100% certain what you're going to ask me to show you from my config files, but here's what I can think of so far...
This config was done by a third party, but here's some basic info that might help...
Start of my /etc/nginx/sites-enabled/wordpress
server {
listen 8080;
server_name mysite.com;
root /var/www/wordpress;
index index.php;
Portion of /etc/default/varnish
DAEMON_OPTS="-a XXX.XXX.XXX.XXX:80 \
-T localhost:6082 \
-f /etc/varnish/wordpress.vcl \
-S /etc/varnish/secret \
-s file,/var/lib/varnish/$INSTANCE/varnish_storage.bin,1G"
Also this from /etc/varnish/default.vcl:
backend default {
.host = "127.0.0.1";
.port = "8080";
}
I'm afraid to edit this and break the whole site. Anything jump out?
UPDATE: In case this is of any use, I found the URL my browser is TRYING to get to after I click the Facebook login button (this results in being taken back to the page I logged in from, with ':8080' being appended to the end of 'mysite.com'):
mysite.com/?code=AQBsvAQ3jFCJtYQO8AEhz-V8Yqr4HnhpZLaaqFjnvQenwp9FnvIBYGLdus2_vltS0LKicF2QiVKPewrfpRB2ODKF04PkHgJK-KynG3m0xxtztrdXUKPNgPVJ7YxQjnf1kcPagCm5dRjyAqeRw7Xr7exfrLP40yFLSR_eyrJvWUT9oF7ibpX_3883VWunJ3PX5keI7FYCvz2iWvdchWCGOFyBNAI_xtGLwPuMghij1xGRhp2P7dlGnm6GqVqeKO6oe3lhPDBuD0ogGV3TgbWfmC8omMf1d70YHhws3xtx7Lr2lvYPRsKAY5YU9v8x4qRAfvw#_=_
...wondering now if the "code=" in the URL is somehow being grabbed by the rewrite rules?
ANOTHER UPDATE Having found this URL about a plugin that's functionally similar to a Facebook login plugin I'm trying to use, I followed the suggestion and made the following edit, which at least stopped the errant redirect. Now I have a different problem for a different forum (namely that the plugin doesn't actually log the user in).
EDITED
$request_port = ((!empty ($_SERVER ['SERVER_PORT']) AND $_SERVER ['SERVER_PORT'] <> '80') ? (":" . $_SERVER ['SERVER_PORT']) : '');
to
$request_port = '';