I'll take the liberty of bringing up this subject again because I find myself with the same problem on Wordops. I can't redirect the no-wwww to www.
I created a redirect.conf file in /etc/nginx/conf.d/ including :
return 301 $scheme://www.$host$request_uri;
But it doesn't work.
For the record:
When I create a site for Wordpress (with Redis cache) I launch the following command:
wo site create www.domain.tld --wpredis
However Wordops create me the following directory:
/var/www/domain.tld and not
/var/www/www.domaine.tld as mentioned in the installation code.
When I execute the command "wo site edit domaine.tld" to configure the nginx file, I have the following code :
server_name domain.tld www.domain.tld;
access_log /var/log/nginx/domain.tld.access.log rt_cache_redis;
index index.php index.html index.htm;
Can you help me? Thank you