Currently the .env property DOMAIN_OR_PUBLIC_IP doesn’t support both www.example.com and example.com domains. I believe this is the -d flag in certbot. So in certbot I would do:
-d example.com -d www.example.com
How do I indicate two domains using this property DOMAIN_OR_PUBLIC_IP?
After doing some searching I realise this is more of nginx docker issue than openvidu. I’ve manually ran the --expand certbot option on my current certificate to resolve this. Hopefully the auto-renewal will still work as it should.
Please note: Running the –expand solution actually will not work. This will cause the auto renewal by OpenVidu to fail. LetsEncrypt –expanded command is looking for the verification @ endpoint :80 (insecure) which gets redirected by Nginx to :443 (secure) but because this has an expired certificate the renewal will fail.
If I can’t add multiple domains i.e. the www as part of the OpenVidu (.env) LetsEncrypt process how can I change Nginx to redirect my traffic from www to non-www?
Hi when do you expect a new release? And is there a way for me to get this patch applied sooner. I’ve tried many workarounds and still have no site available on www.
We want to release in 2 weeks or so. As a workaround you can try to build your own nginx-proxy. I think it would be easy. I did not test it but you can try to follow this steps
With all the changes, go again to the directory openvidu-server/docker/openvidu-proxy and execute the script create_image.sh. You can use the TAG_NAME you want to use for your custom docker image:
./create_image.sh <TAG_NAME>
Upload your docker image in the docker registry you want and pull it in your server
When the customized image is in your server, replace it in `/opt/openvidu/docker-compose.yml:
...
nginx
image: <YOUR_CUSTOM_IMAGE>
...
The 2.16.0 version will have an env variable to enable www redirection. Something like REDIRECT_WWW=true, so when you update to the new version you will not need to do anything like that again.