You are not logged in.

#1 2009-12-04 10:15:17

MindTooth
Member
From: Norway
Registered: 2008-11-11
Posts: 331

nginx redirects to http://localhost/dbacp, where dbacp is phpMyAdmin

Hello,

Have managed to get nginx working, however, when I try accessing phpMyAdmin; http://my-ip/dbacp it gets redirected to http://localhost/dbacp.
I'm then unable to access phpMyAdmin.

Does anyone know how to solve this? I followed the wiki.

Ed1t: This also occur to other sub-folder I have in my document root of nginx.

Last edited by MindTooth (2009-12-04 10:19:33)

Offline

#2 2009-12-04 11:18:29

MindTooth
Member
From: Norway
Registered: 2008-11-11
Posts: 331

Re: nginx redirects to http://localhost/dbacp, where dbacp is phpMyAdmin

I have the same problem with lighttpd. Using php-cgi. May that be the problem?

Offline

#3 2009-12-06 22:29:54

MindTooth
Member
From: Norway
Registered: 2008-11-11
Posts: 331

Re: nginx redirects to http://localhost/dbacp, where dbacp is phpMyAdmin

No one out there with an solution? I had hoped to change to either lighttpd or nginx, but if I can't solve this, I must go back to Apache.

Offline

#4 2010-06-24 07:47:46

whoisrich
Member
Registered: 2010-06-24
Posts: 1

Re: nginx redirects to http://localhost/dbacp, where dbacp is phpMyAdmin

The cause:

When nginx corrects a missing trailing slash, it uses the server_name entry for the redirection URL.
By default /etc/nginx/sites-available/default has the entry server_name localhost;

The solution:

Add the entry server_name_in_redirect off; to the config ( like just below the server_name entry )
http://wiki.nginx.org/NginxHttpCoreModu … n_redirect


( I know the thread is old, but this was one of the first places google pointed me, so came back to post the answer )

Offline

#5 2010-07-05 19:36:07

MindTooth
Member
From: Norway
Registered: 2008-11-11
Posts: 331

Re: nginx redirects to http://localhost/dbacp, where dbacp is phpMyAdmin

Thank you so incredible much! Where at great help smile Had forgot about this and, and though phpBB behaved as well.. Now I know that this was a nginx design. Once again, thank you smile

Offline

#6 2014-03-19 09:57:17

eliasw
Member
Registered: 2014-03-19
Posts: 1

Re: nginx redirects to http://localhost/dbacp, where dbacp is phpMyAdmin

I had this problem but only in the Chrome browser.
After setting "server_name_in_redirect off" I also had to clear the browser cache.

Offline

#7 2014-03-19 15:17:45

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: nginx redirects to http://localhost/dbacp, where dbacp is phpMyAdmin

eliasw, welcome to the forums. We have a policy to not necrobump. You have provided additional info, which is fine, but I will close this thread now so we don't get any power posts.

https://wiki.archlinux.org/index.php/Fo … Bumping.22


Closing...


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#8 2014-03-19 15:19:39

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,728

Re: nginx redirects to http://localhost/dbacp, where dbacp is phpMyAdmin

Hi eliasw, and Welcome to Arch Linux smile

Be careful of old threads.   In this case, it looks like your post is relevant to the topic, even though it is ancient.  Thank you.  But, I have not seen the participants in the thread for as long as I can remember, so I would not anticipate a response.

Leaving open....

Edit, nope.  I guess I won't be leaving it open.  My colleague beat me to it.

Last edited by ewaller (2014-03-19 15:20:44)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB