easyengine
easyengine copied to clipboard
www and non-www handling.
EE V4 does not seem to be handling www to non www redirects. One of the 6 sites I created created a www redirect conf file. However it does not work with https (no config that would be expected to). No other sites have any www handeling. This was default behavior with V3. So any of my sites that are accessed with www redirect to the first site created (Also first alphabetically, so not totally sure there)
System Information +-------------------+----------------------------------------------------------------------------+ | OS | Linux 4.15.0-45-generic #48-Ubuntu SMP Tue Jan 29 16:28:13 UTC 2019 x86_64 | | Shell | /bin/bash | | PHP binary | /usr/bin/php7.2 | | PHP version | 7.2.15-0ubuntu0.18.04.1 | | php.ini used | /etc/php/7.2/cli/php.ini | | EE root dir | phar://ee.phar | | EE vendor dir | phar://ee.phar/vendor | | EE phar path | /root | | EE packages dir | | | EE global config | /opt/easyengine/config/config.yml | | EE project config | | | EE version | 4.0.10 | +-------------------+----------------------------------------------------------------------------+
Distributor ID: Ubuntu Description: Ubuntu 18.04.1 LTS Release: 18.04 Codename: bionic
Client: Version: 18.09.1 API version: 1.39 Go version: go1.10.6 Git commit: 4c52b90 Built: Wed Jan 9 19:35:31 2019 OS/Arch: linux/amd64 Experimental: false
Server: Docker Engine - Community Engine: Version: 18.09.1 API version: 1.39 (minimum version 1.12) Go version: go1.10.6 Git commit: 4c52b90 Built: Wed Jan 9 19:02:44 2019 OS/Arch: linux/amd64 Experimental: false
docker-compose version 1.23.2, build 1110ad01 docker-py version: 3.6.0 CPython version: 3.6.7 OpenSSL version: OpenSSL 1.1.0f 25 May 2017
Same holds for non-www to www handling.
I have tested multiple times running:
sudo ee site create www.domain.com --type=wp --ssl=le --wildcard
When visiting domain.com it doesn't redirect to www and I get a privacy error. I have checked the config file (/opt/easyengine/services/nginx-proxy/cond.d/www.domain.com-redirect.conf) and all looks good as well.
I have also restarted the nginx proxy and the server, multiple times and still no good.
I found somewhere that EE is using jwilder/nginx-proxy as the proxy. Its possible the version being used is broken? Or modified in some way. I tried using it for another service running in a container outside of EE. The Nginx-proxy was updated with the new container info but incomplete and incorrect. And it did not match the other containers that were made by EE. Unfortunately configs are just not created correctly. I may end up manually having to manage a separate proxy container until these issues are hopefully fixed. I wish I could get a better handle on how EE is interacting with nginx-proxy. My programming ability is vague at best.
I have found that the format of the create command may play a role in this issue. I recreated each of my broken sites making sure the URL was the first argument and they seem to work like that. I am still having issues with nginx-proxy, when trying to add another container outside of EE (Portainer and Postal) with the variables the certificates are made for the root only and do not match the subdomain.
EDIT: I am jknight2014, I was using an old user earlier.
If you are setting up additional containers you will need to establish network connections to the new containers. EE does not use the default docker bridge network, but established a custom ee network. The Nginx-proxy is only connected to the Nginx for each site. Look for the docker network called frontend.
The network is connected, postal is setup to mail.example.com with the LE domain also set to mail.example.com. Navigating to Mail.example.com work and I have access to postal. However the ssl Certificate served is for example.com and therefor invalid. No certificate for mail.example.com is retreived. Its almost like it is expecting example.com to be a wild card which it is not.