Skip to content

[HELP] Help with self-hosted Nginx reverse proxy #1170

Open
@maxacarvalho

Description

Hi, I'm using the self-hosted version.

Describe the bug
I'm having an issue while trying to serve the service using Docker compose and Nginx as reverse proxy. I'm getting a 400 Bad Request error.

My config is pretty simple, here's the docker-compose.yml file:

services:
  app:
    restart: always
    image: getfider/fider:stable
    ports:
      - "8000:3000"
    environment:
      BASE_URL: http://localhost

      DATABASE_URL: REDACTED

      JWT_SECRET: REDACTED

      # From which account e-mails will be sent
      EMAIL_NOREPLY: REDACTED

      EMAIL_AWSSES_REGION: us-east-1
      EMAIL_AWSSES_ACCESS_KEY_ID: REDACTED
      EMAIL_AWSSES_SECRET_ACCESS_KEY: REDACTED

And here's the Nginx config:

server {
    server_name  roadmap.nicksaudelabs.com;

    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/roadmap.nicksaudelabs.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/roadmap.nicksaudelabs.com/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

    client_max_body_size 100m;

    location / {
        proxy_buffering off;
        proxy_request_buffering off;
        proxy_pass_request_headers on;
        proxy_pass http://localhost:8000;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;proxy_set_header Host $host;
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Scheme $scheme;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_redirect off;
        proxy_pass_header   Set-Cookie;
        proxy_read_timeout 10m;
        proxy_send_timeout 100m;
    }
}


server {
    if ($host = roadmap.nicksaudelabs.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot

    server_name  roadmap.nicksaudelabs.com;
    listen       80;
    return 404; # managed by Certbot
}

I'm not sure how to start debugging at the moment. The logs give me nothing 😢

I appreciate any help. Thanks.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions