GithubHelp home page GithubHelp logo

How to config SSL? about clearml-server HOT 6 CLOSED

allegroai avatar allegroai commented on May 20, 2024
How to config SSL?

from clearml-server.

Comments (6)

bmartinn avatar bmartinn commented on May 20, 2024

Hi @GeoffreyChen777
As you can see in the installation instruction here, just under the diagram:
trains-server supports two types of configurations:

    Single IP (domain) with the following open ports
        Web application on port 8080
        API service on port 8008
        File storage service on port 8081

    Sub-Domain configuration with default http/s ports (80 or 443)
        Web application on sub-domain: app.*.*
        API service on sub-domain: api.*.*
        File storage service on sub-domain: files.*.*

This means you have to setup the Nginx to forward the following subdomains (yes, only these subdomains are supported):

  app.*.* -> http://<trains_server_ip>:8080
  api.*.* -> http://<trains_server_ip>:8008
  files.*.* -> http://<trains_server_ip>:8081

from clearml-server.

GeoffreyChen777 avatar GeoffreyChen777 commented on May 20, 2024

@bmartinn Hi, thanks for your reply.

I tried to set my Nginx with the configuration:

server {
    listen 80;

    server_name app.mydomain.com;

    location / {
        proxy_pass       http://127.0.0.1:8080;
        proxy_set_header Host      $host;
        proxy_set_header X-Real-IP $remote_addr;
    }
}


server {
    listen 80;

    server_name api.mydomain.com;

    location / {
        proxy_pass       http://127.0.0.1:8008;
        proxy_set_header Host      $host;
        proxy_set_header X-Real-IP $remote_addr;
    }
}

server {
    listen 80;

    server_name files.mydomain.com;

    location / {
        proxy_pass       http://127.0.0.1:8081;
        proxy_set_header Host      $host;
        proxy_set_header X-Real-IP $remote_addr;
    }
}

Can not solve it.

Do I need to add three A record (api, app, files) to my domain's DNS console?

from clearml-server.

bmartinn avatar bmartinn commented on May 20, 2024

@GeoffreyChen777 regrading the DNS entry:
First make sure you get the correct IP with :
ping app.mydomain.com
(If you do not, then yes you need to configure the DNS records of your domain)

BTW:
I would recommend using:
app.trains.mydomain.com , api.trains.mydomain.com , files.trains.mydomain.com ,

from clearml-server.

GeoffreyChen777 avatar GeoffreyChen777 commented on May 20, 2024

@bmartinn

Now I have added app.trains.mydomain.com , api.trains.mydomain.com , files.trains.mydomain.com to my DNS console. When I ping app.trains.mydomain.com, I can get the correct IP.

I also set my nginx to forward the subdomian to the corresponding port. When I open https://api.trains.mydomain.com, I can get:

{"meta":{"id":"7c828bb4526846f29018f44ffaccb4b7","trx":"7c828bb4526846f29018f44ffaccb4b7","endpoint":{"name":"","requested_version":1.0,"actual_version":null},"result_code":400,"result_subcode":0,"result_msg":"Invalid request path /","error_stack":null},"data":{}}

I think it means that I can access apiserver(port 8008) through api.trains.mydomain.com.

I think, now, I need to change some configuration files of trains-server.
Because I found that the trains-server still tries to access port 8008:
image

from clearml-server.

bmartinn avatar bmartinn commented on May 20, 2024

The Web App will access the API server based on the address it is served from:
i.e. If browsing to http://localhost:8080 it will look for the Api server at https://localhost:8008
and if browsing to http://app.trains.mydomain.com it will look for http://api.trains.mydomain.com

Try clearing cookies, restarting the browser and opening http://app.trains.mydomain.com

from clearml-server.

GeoffreyChen777 avatar GeoffreyChen777 commented on May 20, 2024

After I refresh my cookies cache, everything works fine now!

Thanks for you help! @bmartinn

Have a nice day!

from clearml-server.

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.