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

First login fails #17

Closed
f1reflyyyylmao opened this issue Sep 18, 2019 · 4 comments
Closed

First login fails #17

f1reflyyyylmao opened this issue Sep 18, 2019 · 4 comments

Comments

@f1reflyyyylmao
Copy link

I installed black candy without any errors on a dedicated debian server, following every step of your guide and making sure the permissions on my media files are right. When I try to access the website, which is hosted behind a reverse proxy (nginx:

server {
	listen 443 ssl;
        listen [::]:443 ssl;

        include snippets/ssl-common.conf;

        server_name candy.mydomain.com;

	location / {
		proxy_set_header        Host            $host;
                proxy_set_header        X-Real-IP       $remote_addr;
                proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
		proxy_pass http://127.0.0.1:8000;
	}
}

). The site access works just fine, but when I try to log in with admin@admin.com and foobar, I get a 422 (unprocessable entity) response. Is this related to me being too dumb to set up a reverse proxy or is it your program thats to blame?

@aidewoode
Copy link
Member

I am not quite sure the reason cause the issue. Maybe the reason is from ssl, I haven't try to use ssl on black candy yet. Anyway I will take some time try to find out the reason on weekends. Thanks for you try to use black candy.

@f1reflyyyylmao
Copy link
Author

f1reflyyyylmao commented Sep 20, 2019

I found the solution myself, the issue was I was missing a proxy_redirect off; in my nginx server block. Everything works fine now. Sorry for your trouble.
Update:
Ok, nevermind, it worked yesterday, now it won't. Not quite sure why.

@aidewoode
Copy link
Member

This doesn't seem to be blackcandy's issue, but rather nginx's configuration issue, and it's been open for long time and no other users have the same issue. So I will close it.

@maik-s
Copy link

maik-s commented Jan 23, 2021

@f1reflyyyylmao

I had the same issue, running black_candy behind a reverse proxy, which uses https.
I was finally able to fix the issue by adding

  proxy_set_header X-Forwarded-Proto $scheme;
  proxy_set_header X-Forwarded-Ssl on;

to my nginx server block

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants