Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Add nginx reverse proxy example #1055

Closed
PaulGoldschmidt opened this issue Mar 9, 2022 · 1 comment
Closed

Add nginx reverse proxy example #1055

PaulGoldschmidt opened this issue Mar 9, 2022 · 1 comment

Comments

@PaulGoldschmidt
Copy link

PaulGoldschmidt commented Mar 9, 2022

This issue is a direct consequence of running alf.io in an docker environment (using docker-compose) and being stuck with the "development mode" notice, although the site access is no problem (see also #363 and #834).
Is there an example of a nginx reverse proxy?

This is my nginx config for the reverse proxy right now (the site is of course served with SSL), maybe someone can spot the error - after finding a working configuration, I'll happily do a PR for the complete nginx example.

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

Kind regards,
Paul

@cbellone
Copy link
Member

hi,
for reference here's a working configuration:

location / {
    proxy_pass http://localhost:8080;
    proxy_set_header  X-Real-IP $remote_addr;
    proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header  Host $http_host;
    proxy_set_header  X-Forwarded-Proto $scheme;
}

I'm converting this issue to a discussion, since it does not have any direct impact with alf.io's code

@alfio-event alfio-event locked and limited conversation to collaborators Mar 11, 2022
@cbellone cbellone converted this issue into discussion #1056 Mar 11, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants