diff --git a/debian/resources/nginx/fusionpbx b/debian/resources/nginx/fusionpbx index 271ebc3..b2afa41 100755 --- a/debian/resources/nginx/fusionpbx +++ b/debian/resources/nginx/fusionpbx @@ -46,6 +46,15 @@ server { server { listen 80; server_name fusionpbx; + + #redirect letsencrypt to dehydrated + location ^~ /.well-known/acme-challenge { + default_type "text/plain"; + auth_basic "off"; + alias /var/www/dehydrated; + } + + #rewrite rule - send to https with an exception for provisioning if ($uri !~* ^.*(provision|xml_cdr).*$) { rewrite ^(.*) https://$host$1 permanent; break; @@ -150,6 +159,13 @@ server { ssl_ciphers HIGH:!ADH:!MD5:!aNULL; #ssl_dhparam + #redirect letsencrypt to dehydrated + location ^~ /.well-known/acme-challenge { + default_type "text/plain"; + auth_basic "off"; + alias /var/www/dehydrated; + } + #REST api if ($uri ~* ^.*/api/.*$) { rewrite ^(.*)/api/(.*)$ $1/api/index.php?rewrite_uri=$2 last;