aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-08-31 17:47:32 -0700
committerzotlabs <mike@macgirvin.com>2017-08-31 17:47:32 -0700
commit6d87311394356f2f072c55338673d6ebc865eede (patch)
tree6df17631c1b562d1509e9b97979d99129de06bcb /Zotlabs
parentaec92e0e17297252d95169bab7d8bb6ff57e72c3 (diff)
downloadvolse-hubzilla-6d87311394356f2f072c55338673d6ebc865eede.tar.gz
volse-hubzilla-6d87311394356f2f072c55338673d6ebc865eede.tar.bz2
volse-hubzilla-6d87311394356f2f072c55338673d6ebc865eede.zip
now letsencrypt is creating a .htaccess file with re-write rules which kills most of our .well-known routes
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Web/Router.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/Zotlabs/Web/Router.php b/Zotlabs/Web/Router.php
index 3190369c8..710aa2844 100644
--- a/Zotlabs/Web/Router.php
+++ b/Zotlabs/Web/Router.php
@@ -119,6 +119,18 @@ class Router {
if(! (\App::$module_loaded)) {
+ // undo the setting of a letsencrypt acme-challenge rewrite rule
+ // which blocks access to our .well-known routes.
+ // Also provide a config setting for sites that have a legitimate need
+ // for a custom .htaccess in the .well-known directory; but they should
+ // make the file read-only so letsencrypt doesn't modify it
+
+ if(strpos($_SERVER['REQUEST_URI'],'/.well-known/') === 0) {
+ if(file_exists('.well-known/.htaccess') && get_config('system','fix_apache_acme',true)) {
+ rename('.well-known/.htaccess','.well-known/.htaccess.old');
+ }
+ }
+
$x = [
'module' => $module,
'installed' => \App::$module_loaded,