georchestra / docker

Quick start geOrchestra with docker
17 stars 22 forks source link

Use a self-signed certificate not work in georchestra 23.0 - Windows support #240

Closed superbully closed 7 months ago

superbully commented 11 months ago

Hello, excuse me for me english. I´m trying configure georchestra 23.0 with docker using a self-signed certificate but not work, only get the error "404 Not Found" . With georchestra 20.1 with docker work fine with a self signed cert . I follow the steps of the published document: https://github.com/georchestra/docker#about-the-domain-name ¿ In the version 23.0 it´s not possible to use a self-signed certificate as in version 20.1 ? Thank you so much. Best regards.

fvanderbiest commented 11 months ago

¿ In the version 23.0 it´s not possible to use a self-signed certificate as in version 20.1 ?

It should be... Never tried by myself though. Asking a colleague.

jeanpommier commented 11 months ago

Hi @superbully , I believe I did it recently. It should work.

superbully commented 11 months ago

Hi, I have followed these steps:

in the folder that is installed georchestra: cd resources/ssl && mkcert georchestra.mydomain.org
mv georchestra.mydomain.org.pem georchestra.mydomain.org.crt mv georchestra.mydomain.org-key.pem georchestra.mydomain.org.key

after, edit the file "traefik-config.yml" in the folder resources like this:

tls: certificates:

then, in the file host , in a machine windows "C:\Windows\System32\drivers\etc\hosts", add a line like this:

161.x.x.x georchestra.mydomain.org

When i type in a browser the domain georchestra.mydomain.org i have the error "404" .

On the other hand, with version 20.1, it works perfectly, any ideas?

edevosc2c commented 11 months ago

You need to also follow these steps: https://github.com/georchestra/docker#about-the-domain-name

superbully commented 11 months ago

Hi, I have followed the steps https://github.com/georchestra/docker#about-the-domain-name in detail.

edevosc2c commented 11 months ago

Just for confirmation what is after Host( for the 41th line for the file docker-compose.override.yml: https://github.com/georchestra/docker/blob/master/docker-compose.override.yml#L41

Is it georchestra.mydomain.org or georchestra-127-0-1-1.traefik.me

Did you do a docker compose up -d to reload the configuration?

superbully commented 11 months ago

Yes, i have the line with host correct: - "traefik.http.routers.cas.rule=Host(georchestra.mydomain.org) && PathPrefix(/cas)"

I attach the file docker-compose.override.yml docker-compose.override.txt

jeanpommier commented 11 months ago

161.x.x.x georchestra.mydomain.org

I would rather expect an IP like 192.xx.xx.xx. Starting with 161 it doesn't look like a local IP. Could this be the issue ?

It is also possible that this is a windows-related issue, although I don't think so. There is no official support for windows. I'll give it a try, though

superbully commented 11 months ago

Indeed, the ip address is a public address. In version 20.1 everything works perfectly, I can access Georchestra from windows machines and from linux machines. In the new version, the philosophy is the same, I generate the self-signed certificate and update the lines according to https://github.com/georchestra/docker#about-the-domain-name.

I think it's probably my mistake, but I haven't been able to find the solution for several days.

edevosc2c commented 11 months ago

You mentioned using Windows. I wonder if it's not related to that operating system. Does the installation by default without touching anything works (not changing the domain)?

Does your directory name is also called "docker"? Could be related to https://github.com/georchestra/docker/issues/214

jeanpommier commented 11 months ago

Indeed, it works on Linux, but my first attempt to have it run on Windows seems unsuccessful. This is an nginx 404 not found. It looks like the static nginx container is intercepting everything

Edit: nope, this was docker-desktop and the integrated kubernetes nginx ingress that was messing around

edevosc2c commented 11 months ago

I think for Windows users it's better to host inside a virtual machine or use WSL: https://learn.microsoft.com/en-us/windows/wsl/install

fvanderbiest commented 11 months ago

I think for Windows users it's better to host inside a virtual machine or use WSL: https://learn.microsoft.com/en-us/windows/wsl/install

Maybe we should edit the readme to inform users about this limitation.

superbully commented 11 months ago

Hi, thank you very, very much. The problem was as @edevosc2c says, the folder was not called "docker". Now, everything is working. To give a little more information and clarify the issue, I meant that I was using a windows machine to access georchestra from a browser. I am a member of a working group of the University of Castilla la Mancha (UCLM), in which we are working on a project with Georchestra. We have a linux server (Ubuntu) where we have deployed several Georchestra environments (pro, pre and test), so I did not call the Docker folder, the folder was called as the environment (docker_pro_xxx, docker_pre_xxx, docker_test_xxx). With version 20.1 everything worked perfectly and I had the different environments up (each one was accessed by different ports and subdomains). A week ago I started to deploy the new version in the same way, and I found the error 404 . Thank you very much for the help. Regards.

fvanderbiest commented 11 months ago

Maybe we should edit the readme to inform users about this limitation.

+ mention the requirement for the folder name ! (before we fix it, if possible)

@superbully Glad your setup is now running. Feel free to get in touch on IRC for more information regarding the next steps.

edevosc2c commented 7 months ago

Closing in favor of https://github.com/georchestra/docker/issues/214