Giter Site home page Giter Site logo

CIAO_BASE_URL option about ciao HOT 7 CLOSED

ojoeth avatar ojoeth commented on August 29, 2024
CIAO_BASE_URL option

from ciao.

Comments (7)

MatrixUsman avatar MatrixUsman commented on August 29, 2024 1

thanks this worked for me aswell!

from ciao.

brotandgames avatar brotandgames commented on August 29, 2024

Hi, could you please add more information concerning your reverse proxy and its configuration?

BTW, there is a template for a Feature Request.

from ciao.

ojoeth avatar ojoeth commented on August 29, 2024

Ah sorry, didn't see the template. I should definitely look before posting an issue next time!

I am using nginx for my reverse proxy, with the following config:

    location / {
        proxy_pass http://ciao:3000;
        client_max_body_size 100M;
        proxy_set_header  Host $host;
        proxy_set_header  X-Real-IP $remote_addr;
        proxy_set_header  X-Forwarded-Proto https;
        proxy_set_header  X-Forwarded-For $remote_addr;
        proxy_set_header  X-Forwarded-Host $remote_addr;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }

from ciao.

brotandgames avatar brotandgames commented on August 29, 2024

Could you please post the whole nginx config for testing purposes?

from ciao.

ojoeth avatar ojoeth commented on August 29, 2024

(replacing my domain with ciao.example.com)
/etc/nginx/conf.d/ciao.conf:

server {
    listen 443 ssl; # IPv4
    listen [::]:443 ssl; # IPv6
    server_name ciao.example.com;

    ssl_certificate /etc/nginx/ssl/live/ciao.example.com/fullchain.pem;
    ssl_certificate_key /etc/nginx/ssl/live/ciao.example.com/privkey.pem;

    proxy_set_header Host      $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_read_timeout         600;

    location / {
        proxy_pass http://ciao:3000;
        client_max_body_size 100M;
        proxy_set_header  Host $host;
        proxy_set_header  X-Real-IP $remote_addr;
        proxy_set_header  X-Forwarded-Proto https;
        proxy_set_header  X-Forwarded-For $remote_addr;
        proxy_set_header  X-Forwarded-Host $remote_addr;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }
}

/etc/nginx/conf.d/default.conf:

server {
    listen 80;
    listen [::]:80;

    server_name _;
    server_tokens off;

    location /.well-known/acme-challenge/ {
        root /var/www/certbot;
    }

    location / {
        return 301 https://example.org$request_uri;
    }
}

The nginx container and ciao container are in the same docker network.

from ciao.

brotandgames avatar brotandgames commented on August 29, 2024

Could you please try to change the line

        proxy_set_header  X-Forwarded-Host $remote_addr;

to

        proxy_set_header  X-Forwarded-Host $host;

in the location block of the /etc/nginx/conf.d/ciao.conf and reload nginx?

from ciao.

ojoeth avatar ojoeth commented on August 29, 2024

That appeared to work! Thank you.

from ciao.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.