Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nginx as reverse proxy Fail to login with 4.5.1 #250

Closed
guilmxm opened this issue Nov 5, 2012 · 5 comments
Closed

Nginx as reverse proxy Fail to login with 4.5.1 #250

guilmxm opened this issue Nov 5, 2012 · 5 comments
Labels

Comments

@guilmxm
Copy link

guilmxm commented Nov 5, 2012

Hi all,

Environment: HomeServer (Ubuntu 12.10 LTS)
Server: Apache 2.2.22
Database: mysql
Client: Chrome / Firefox
OC-Version: 4.5.1
PHP-Version: 5.4.6

I am actually trying to upgrade from Ubuntu repository version (4.0.7) to latest 4.5.1 and i'm having an issue with nginx acting as a reverse proxy in my front Internet host.

My configuration as follows:

Front host (Debian based, nginx 1.2.1 acting as reverse proxy with a reverse proxy location for owncloud) --> Server running apache2

With version 4.0.7, no issue i can login with any existing user with no issue, but with 4.5.1 i can only login with the first user i created during installation time.

When i try to login with any other user, i get back to main menu as if the password would be wrong. (message wrong passwor ?)

Therefore, i can successfully login directly to my internal server (so bypassing the reverse proxy) with any users, the issue only exist when passing through the revserse proxy.

BUT this works perfectly fine with same configuration when running 4.0.7, there seems to be a regression with 4.5.1 regarding reverse proxy...

I've been looking for a solution everywhere and haven't find any successful answer...
One closed issue: http://bugs.owncloud.org/thebuggenie/owncloud/issues/oc-762

So i'm looking for any one having a working nginx configuration with 4.5.1, could not find any interesting log on both reverse proxy / internal server !

Thanks in advance for you help !

My actual location config:

location /owncloud/ {
proxy_set_header X-Forwarded-Host some.mydomain.org;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://internal:port;
access_log /var/log/nginx/owncloud.access.log;
error_log /var/log/nginx/owncloud.error.log;
}
@guilmxm
Copy link
Author

guilmxm commented Nov 5, 2012

Forgot to mention http / https relation :

External (nginx RP running https) --> Internal (Apache 2 running http)

Also tried both https with same SSL certificate, same issue

@fmms
Copy link
Contributor

fmms commented Nov 5, 2012

Maybe people in #22 can help?

@illwieckz
Copy link

It's not the same problem as in #22, it's because OC doesn't know you use https to connect to your reverse proxy, and OC disallow connecting using unsecure http by default (and refuse connections without message).

Try with :

"forcessl" => false,

in config/config.php

(but you might get, once connected, other problems including erroneous calculated paths because OC does not know the URL requested by the browser and will use this information)

@guilmxm
Copy link
Author

guilmxm commented Nov 13, 2012

Hi,

Thanks for the answer, it could have been a reason but seems not.
In deed, i've tried both configuration, with apache backend ssl enabled and only http with same result.

I finally restarted from scratch and installed using Repository instead of source (i'm running Ubuntu 12.10 LTS) which did the trick, still i have no explanation why it was failing before ^^^

The situation was the incapacity to connect to any other user but the admin user created was ok...

Thanks again :-)

@Tie-fighter
Copy link

When is this going to be fixed in an official release? :/

@lock lock bot locked as resolved and limited conversation to collaborators Aug 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants