Hi Folks,
I now discovered a problem with SSL renewing with a bit specific nginx that used to work like 2 months ago.
When I try to renewing SSL following error displays
Failed to request certificate : virtualmin-nginx::feature_list_web_redirects failed : Can’t use an undefined value as an ARRAY reference at /usr/libexec/webmin/virtualmin-nginx/virtual_feature.pl line 1550.
As I said I have 2 lines added in nginx for that domain that force redirection to https and www
if ($http_host ~* “^(?!www.).*$”) {return 301 https://www.$http_host$request_uri;}
if ($scheme = http) {return 301 https://$host$request_uri;}
at the very begging nginx config for that domain after
server {
and before
server_name domain.net www.domain.net;
…
so it looks like
server {
if ($http_host ~* "^(?!www\.).*$") {return 301 https://www.$http_host$request_uri;}
if ($scheme = http) {return 301 https://$host$request_uri;}
server_name domain.net www.domian.net;
…
all other config values are default provide by Virtualmin nginx module.
When I comment out both lines
if ($http_host ~* "^(?!www\.).*$") {return 301 https://www.$http_host$request_uri;}
if ($scheme = http) {return 301 https://$host$request_uri;}
I can renew Let’s Encrypt SSL, problem is it will not work with these redirections. And it used to work like 2 months ago when I forced https/www redirection.
Any of you have an idea what went wrong or give me recommendation for better redirection.
Just to add server config:
Operating system | CentOS Linux 7.8.2003 |
---|---|
Perl version | 5.016003 |
Path to Perl | /usr/bin/perl |
BIND version | 9.9 |
Postfix version | 2.10.1 |
Mail injection command | /usr/lib/sendmail -t |
Logrotate version | 3.8.6 |
MySQL version | 10.3.23 |
ProFTPD version | 1.35 |
SpamAssassin version | 3.4.0 |
ClamAV version | 0.102.3 |
Nginx version 1.16.1
|Webmin version|1.942|
Usermin version|1.791|
Virtualmin version|6.09|
all up to date
Thank you in advance