SteveLTN / https-portal

A fully automated HTTPS server powered by Nginx, Let's Encrypt and Docker.
MIT License
4.46k stars 295 forks source link

the docker compose file does not seem to be respected #275

Closed user171 closed 3 years ago

user171 commented 3 years ago

I use the Docker Compose file from the Wordpress example here: https://github.com/SteveLTN/https-portal/blob/master/examples/wordpress/docker-compose.yml

I have changed the domain to switch it to mine and also the MYSQL_ROOT_PASSWORD. Nothing else.

And when I run docker-compose up -d, sure enough it generates the self-signed certificate (I have also tried with the real Let's Encrypt certificate) and then the Wordpress instance is available at the domain URL.

The problem is, the first page of Wordpress configuration does not seem to render the CSS, there is no Wordpress logo. But I can still select the language. The real problem happens on the second page of configuration, the CSS really seems off, the logo appears repeated all over the header, but the main issue is the database connection is not made. Wordpress asks for the database details and password, which I don't remember having done in the past when setting up https-portal.

I believe this is supposed to be automatic, as I remember having done before. Am I wrong? or did I miss something?

SteveLTN commented 3 years ago

This issue is recently introduced by Wordpress Docker container. Wordpress failed to respect X_FORWARDED_PROTO header sent by HTTS-PORTAL.

You can follow the Fixing protocol errors section to fix it. Meanwhile, I'll add a comment to the example file so people can be aware of it.

user171 commented 3 years ago

Thanks a lot for the heads up. I will follow your instructions. Closing.

user171 commented 3 years ago

If I understand correctly this issue has to do with SSL connection. But I'm still facing database connection issues. I don't know if this is related.

I don't remember having to inform Wordpress about the Mysql address, username and password in my previous experiences with HTTPS-PORTAL. It is now asking about those details. I filled the details, it seems to connect correctly to the DB but then ends up with 504 Gateway Time-out from Nginx.

Any idea?

Note: maybe this is out of scope for HTTPS-PORTAL.

user171 commented 3 years ago

Adding the environment variables did the trick, but I don't know if that's supposed to be solved this way.

SteveLTN commented 3 years ago

So as I understand it, Wordpress now requires you to manually put in the database credentials, right? Could you post here what needs to be done to make it work here? I can update the example then.

user171 commented 3 years ago

Yes you understand correctly, Wordpress now requires manual input of database credentials. I don't remember having had to do that last time I set it up with HTTPS-PORTAL. Now I follow the examples in the Docker documentation, using environment variables: https://docs.docker.com/compose/wordpress/

SteveLTN commented 3 years ago

Thanks. I updated the document.