Www and non-wwww not setup by default


#1

Is anyone else having trouble with both www and non-www sites? I had to manually edit /opt/easyengine/sites/example.com/config/nginx/conf.d/main.conf to add www.example.com
server_name example.com www.example.com;


#3

www to non-www and vic-versa redirection files are setup in the following directory:
/opt/easyengine/services/nginx-proxy/conf.d/

There is no need to manually make edits. Please send the output of:

ls -al /opt/easyengine/services/nginx-proxy/conf.d/

Also, send the output of ee cli info.

If the files are not setup here then this issue might need debugging.


#4

Thanks for the hint. I see the redirects in there. This might help with cleaning up Cloudflare redirect loops.


#5

@mrrobot47

ls -al /opt/easyengine/services/nginx-proxy/conf.d/

it returns for me:

-rw-r--r-- 1 root root 2.9K Dec  9 08:48 default.conf

…and this is my ee cli info output:

+-------------------+----------------------------------------------------------------------------+
| OS                | Linux 4.15.0-42-generic #45-Ubuntu SMP Thu Nov 15 19:32:57 UTC 2018 x86_64 |
| Shell             | /usr/bin/zsh                                                               |
| PHP binary        | /usr/bin/php7.2                                                            |
| PHP version       | 7.2.13-1+ubuntu18.04.1+deb.sury.org+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      | /var/lib/docker/volumes/global-nginx-proxy_confd/_data                     |
| EE packages dir   |                                                                            |
| EE global config  | /opt/easyengine/config/config.yml                                          |
| EE project config |                                                                            |
| EE version        | 4.0.4                                                                      |
+-------------------+----------------------------------------------------------------------------+

I did setup a new web site (eg: ee site create davide.net --type=wp), and trying to reach www.davide.net I am getting:

# 503 Service Temporarily Unavailable

Thanks for any help.


#6

I had a site that was www.example.com and I had to create it with ee site create www.example.com otherwise it would just redirect loop. example.com would properly get redirected to www.example.com. There were too many links to www.example.com buried in the site to try to change it to non-www.