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

Incorrect port redirection when login (with nginx unix socket setup) #3439

Open
CaiMiao opened this issue Sep 1, 2021 · 7 comments
Open
Assignees
Labels

Comments

@CaiMiao
Copy link

CaiMiao commented Sep 1, 2021

Hi devs,

I'm using openresty (nginx fork) but not using a typical setup for it.
I use server in stream to listen port 443 and use upstream and server which listens on unix sockets.

The model can be simplified as below:

stream {
    upstream web-example {
        server unix:/dev/shm/nginx.web.sock;
    }

    server {
        listen 443;
        listen [::]:443;
        proxy_pass web-example;
    }
}

http {
    server {
        listen unix:/dev/shm/nginx.web.sock ssl;
        server_name example.domain;

        ssl_certificate      ...;
        ssl_certificate_key  ...;

        ...
    }
}

When I login with admin panel, grav server redirects me to https://example.domain:0/admin like below:
20210902003857
(actual practice)

I tried to enable Reverse Proxy option in the Configuration tab but it seems not work for my case.

Can you investigate the problem? thank you in advance!

@mahagr mahagr transferred this issue from getgrav/grav-plugin-admin Sep 13, 2021
@mahagr mahagr self-assigned this Sep 13, 2021
@mahagr mahagr added the bug label Sep 13, 2021
@mahagr
Copy link
Member

mahagr commented Sep 13, 2021

@CaiMiao I have likely found and fixed the bug, but I'm unable to test it. Can you please try the changes in your setup?

@mahagr mahagr closed this as completed Sep 15, 2021
@CaiMiao
Copy link
Author

CaiMiao commented Sep 15, 2021

@mahagr have been busy and i will check when production ships

@CaiMiao
Copy link
Author

CaiMiao commented Sep 15, 2021

seems not working with latest 1.7.21

@mahagr
Copy link
Member

mahagr commented Sep 21, 2021

I don't have a proxy setup, so I cannot really help here. @rhukster you had more experience on proxies?

@CaiMiao
Copy link
Author

CaiMiao commented Sep 21, 2021

maybe you can build a test environment with said config.
the ssl listening can be turn off and replace 443 with 80.

mahagr added a commit that referenced this issue Sep 24, 2021
@CaiMiao
Copy link
Author

CaiMiao commented Oct 27, 2021

the fix not working for latest v1.7.24

@CaiMiao
Copy link
Author

CaiMiao commented Aug 19, 2022

any news on this?

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

No branches or pull requests

2 participants