2

I have the CakePHP framework installed on my www.vimundos.com linux server, before installing CakePHP in my public_html, I issued a SSL certificate successfully using Let's Encrypt which created a .well-known/acme-challenge/ directory containing some content crucial to the certificate.

Of course after installing the framework, my certificate was removed. CakePHP is not allowing direct access to the directory, I tried using the Route::redirect() feature to map .well-known/* urls to the directory, but i only get a ERR_TOO_MANY_REDIRECTS error.

ndm
  • 59,784
  • 9
  • 71
  • 110
John Ray Mendez
  • 47
  • 1
  • 10

2 Answers2

0

Not much to do with CakePHP here. You need to update your .htaccess file (if using Apache) or nginx config not overwrite ./well-known/acme-challenge URL. Something like here: How do I ignore a directory in mod_rewrite?

Community
  • 1
  • 1
Andrej Gr
  • 56
  • 2
0

It's implicit from what's in the question that you have this:

public_html
    composer.json
    .htaccess
    index.php
    ...
    webroot
        .htaccess
        index.php
        css
        img
        js
    .well-known

Whatever version of CakePHP you are using, nothing outside the webroot directory is supposed to be directly accessible, and as such neither is the .well-known folder.

There's a very simple solution, just move it into the webroot directory:

public_html
    composer.json
    .htaccess
    index.php
    ...
    webroot
        .htaccess
        .well-known <- moved
        index.php
        css
        img
        js

Note that "webroot" is supposed to be the apache document root if at all possible (a production style install), not a folder in the document root (a development style install).

AD7six
  • 63,116
  • 12
  • 91
  • 123