Group: Member 
Post Group: Working Newbie
Posts: 64
Status: 
|
Hello,
I would like to force www.domain.com for domain.com. So, I added an extra conf from Webuzo about domain.com with this content:
But it enters in infinite loop raising an ERR_TOO_MANY_REDIRECTS error.
First, I thgough it was due to the fact I also added code to force SSL whatever the domain in /usr/local/apps/nginx/etc/conf.d/common, like this:
Code if ($scheme = 'http'){
return 301 https://$server_name$request_uri;}
Then, searching for a solution I saw that the the recommended way from Nginx is to provide two separated server blocks for domain.com and www.domain.com, then only add the redirection in the domain.com one. Something like this:
And knowing port 80 and 443 are already two blocks, it could gives four server blocks.
How to achieve this, knowing Webuzo keeps control on webuzoVH.conf containing the server blocks? Or is there another way to do it with Webuzo?
TIA
----------------------- OpenVZ VPS, CentOS 7, Webuzo Premium / Desktop and full-stack dev w/ C, C++, Python, Perl, javascript... |