NathanVaughn / webtrees-docker

Up-to-date Docker image for webtrees with all the bells and whistles.
https://hub.docker.com/r/nathanvaughn/webtrees
MIT License
64 stars 15 forks source link

Disabled SSL, still get error in log and it won't start up #56

Closed ronnyandre closed 3 years ago

ronnyandre commented 3 years ago

So I tried to disable everything that has with SSL to do, in order to make the proxy control the security, so I edited the docker-compose file as such:

environment:
      PRETTY_URLS: "1"
      HTTPS: "0"
      SSL: "0"
      HTTPS_REDIRECT: "0"
      SSL_REDIRECT: "0"
      LANG: "en-US"
      BASE_URL: "http://192.168.86.60"
      DB_TYPE: "sqlite"
      DB_NAME: "webtrees.sqlite"
      DB_PREFIX: "wt_"
      WT_USER: "username"
      WT_NAME: "Full Name"
      WT_PASS: "mybadpassword"
      WT_EMAIL: "me@example.com"

I also exposed port 8990 to internal port 80 as this port is taken by another service I run.

The problem is that the container still setting HTTPS according to the logs, and thus the app won't start up:

[NV_INIT] Setting folder permissions for uploads
[NV_INIT] Attempting to automate setup wizard
[NV_INIT] Config file NOT found
[NV_INIT] Not all variables required for setup wizard present
[NV_INIT] Attempting to set pretty URLs status
[NV_INIT] Config file NOT found, please setup webtrees
[NV_INIT] Attempting to set HTTPS status
[NV_INIT] Adding HTTPS, adding HTTPS redirect
Site webtrees already disabled
Site webtrees-redir already enabled
Site webtrees-ssl already enabled
[NV_INIT] Starting Apache
AH00526: Syntax error on line 6 of /etc/apache2/sites-enabled/webtrees-ssl.conf:
SSLCertificateFile: file '/certs/webtrees.crt' does not exist or is empty
NathanVaughn commented 3 years ago

Oh, I see the problem, don't set the SSL environment variables at ALL. The setup script isn't very smart, it's just looking for any value. being set. Set your docker-compose.yml to this:

environment:
      PRETTY_URLS: "1"
      LANG: "en-US"
      BASE_URL: "http://192.168.86.60"
      DB_TYPE: "sqlite"
      DB_NAME: "webtrees.sqlite"
      DB_PREFIX: "wt_"
      WT_USER: "username"
      WT_NAME: "Full Name"
      WT_PASS: "mybadpassword"
      WT_EMAIL: "me@example.com"
ronnyandre commented 3 years ago

Well, after also reading the documentation throroughly I see that it's more or less implicit that this is the way it works as well. Sorry for bothering you with this "issue"!