Welcome! Log In Create A New Profile

Advanced

Re: phpmyadmin on apache behind https nginx

Gelonida
July 13, 2011 02:20PM
Hi Umesh,


On 7/13/2011 7:48 PM, Umesh Sirsiwal wrote:
> You might want to try:
>
> proxy_set_header <http://wiki.nginx.org/NginxHttpProxyModule#proxy_set_header> Host$http_host;
>
> in your proxy.conf.

This is what I have in my proxy.conf

proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

#client_max_body_size = 100m;
#client_body_buffer_size = 128k;
#cleant_header_buffer_size 64k;
#proxy_connect_timeout 90;
#proxy_send_timeout 90;
#proxy_read_timeout 90;
#proxy_buffer_size 16k;
#proxy_buffers 32 16k;
#proxy_busy_buffers_size 64k;


I verified, the varianle Host is taken into account.
I didn't see a differentce between
proxy_set_header Host $host
proxy_set_header Host $http_host

just for fun I tried also
proxy_set_header Host blabla.org

and I can see, that this is where phpmyadmin tries to redirect to.

However it inisists on appending the port.

so it redirects to http://correcthostname:8080

The problem is, that is the port number
and (as soon as I run nginx with ssl, the fact, that it still redirects
to http:// instead of redirecting to http://


>
> -Umesh
>
>
> On 07/13/2011 01:19 PM, Gelonida wrote:
>> Hi,
>>
>> I'm just starting to use nginx.
>> I'm not sure, whether my nginx configuration is wrong or
>> whether there are some parameters do be changed in phpmyadmin, such,
>> that it works well behind a reverse proxy.
>>
>> Currently phpmyadmin is running on apache.
>>
>> What I wanted to do is use nginx (https) as front end
>> and use it to serve all the static contents
>>
>> and keep apache (for the time being) for the php contents
>>
>>
>> The nginx config I use is:
>>
>> location /phpmyadmin {
>> alias /usr/share/phpmyadmin/;
>> index index.php;
>> }
>> location ~ .php$ {
>> # Use apache for the time being
>> proxy_passhttp://127.0.0.1:8080;
>> include proxy.conf;
>> }
>>
>> location / {
>> root /var/www;
>> index index.html index.htm;
>> }
>>
>>
>> my apache configuration is
>> Alias /phpmyadmin /usr/share/phpmyadmin
>>
>>
>> I tested phpmyadmin after reconfigring apache
>> http://hostname:8080/phpmyadmin
>>
>>
>> When running behind nginx following happens:
>> - I get the login screen
>> - I enter user name and password
>> - I am redirected to
>> http://hostname:8080/index.php?...
>> instead ofhttp://hostname/index.php?... thus
>> the browser tries connect directly to the ptoxied server.
>>
>> This will stop working as soon as I let listen apache only on the localhost.
>>
>> forther I'd like to give access to phpmyadmin only via https:
>>
>>
>> What are the parameters, that I have to modify
>> in nginx (or phpmyadmin) to make my setup work.
>>
>> Thanks in advance for your help.
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> nginx mailing list
>> nginx@nginx.org
>> http://nginx.org/mailman/listinfo/nginx
>
>
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://nginx.org/mailman/listinfo/nginx



_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

phpmyadmin on apache behind https nginx

Gelonida July 13, 2011 01:20PM

Re: phpmyadmin on apache behind https nginx

Umesh Sirsiwal July 13, 2011 01:48PM

Re: phpmyadmin on apache behind https nginx

Gelonida July 13, 2011 02:20PM

Re: phpmyadmin on apache behind https nginx

Gelonida July 13, 2011 01:56PM

Re: phpmyadmin on apache behind https nginx

Jim Ohlstein July 13, 2011 02:28PM

Re: phpmyadmin on apache behind https nginx

Gelonida July 13, 2011 02:54PM

Re: phpmyadmin on apache behind https nginx

Umesh Sirsiwal July 13, 2011 03:08PM

Re: phpmyadmin on apache behind https nginx

Gelonida July 13, 2011 04:38PM

Re: phpmyadmin on apache behind https nginx

Francis Daly July 13, 2011 07:00PM

Re: phpmyadmin on apache behind https nginx

Gelonida N July 13, 2011 07:26PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 60
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready