le2ispc
le2ispc copied to clipboard
disable Apache mod_proxy/proxyhttp while authorisation
I have a nodebb Forum running on my domain with running on another port.
with Apache directives "ProxyPass/ProxyPassReverse" failed authorisation:
/le2ispc# le2ispc mydomain.tld
PHP Notice: Array to string conversion in /le2ispc/le2ispc on line 52
1. Get the domain name(s): mydomain.tld Array.
2. Query MySQL whether it's a vhost.
3. Prepare Server for webroot authentication.
4. Run Let's Encrypt Tool
Failed authorization procedure. www.mydomain.tld (http-01): rn:acme:error:unauthorized ::
The client lacks sufficient authorization ::
Invalid response from http://www.mydomain.tld/.well-known/acme-challenge
/PWn8pH2kpnSC4vLlUu8nG57sFpITVviVGFuR3rC7v9Y [12.23.456.890]: 503, mydomain.tld
(http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid
response from http://mydomain.tld/.well-known/acme-challenge
/WLKx2vFYGaGx6hJ0qFrsMBI3dOsVadS-ABobgui6kk [12.34.567.890]: 503
Sorry, there was some error. Please check:
Updating letsencrypt and virtual environment dependencies......
Requesting root privileges to run with virtualenv: /root/.local/share/letsencrypt/bin/letsencrypt --text --agree-tos --renew-by-default --rsa-key-size 4096 --email [email protected] -d mydomain.tld -d www.mydomain.tld -a webroot --webroot-path /var/www/ certonly
IMPORTANT NOTES:
- The following 'urn:acme:error:unauthorized' errors were reported by the server:
Domains: mydomain.tld, www.mydomain.tld
Error: The client lacks sufficient authorization
after deleting "ProxyPass/ProxyPassReverse" its working:
/le2ispc# le2ispc mydomain.tld
PHP Notice: Array to string conversion in /le2ispc/le2ispc on line 52
1. Get the domain name(s): mydomain.tld Array.
2. Query MySQL whether it's a vhost.
3. Prepare Server for webroot authentication.
4. Run Let's Encrypt Tool
5. Read SSL info into vars.
6. Insert SSL info via API.
Done.
please add feature to temporarily disable Apache ProxyPass while running le2ispc/le2ispc_renewer script.
not really sure what proxypass is? is that related to the apache mod_proxy?
Yes is apache mod_proxy
I added an option in https://github.com/sjau/le2ispc/commit/929daf4d6d3571e68f57127d60fc619b93a30d64
- didn't test it though but it should work.
Do not release anything untested. explode() needs two parameters, first being the delimiter.
I tested it... in my brain :) How could I miss the 2 params for explode.. I've used them so often... anyway, fixed.
@Pappmann
Does it work now for you?
i will test it soon
Does it work meanwhile?
disabling modules "proxy_http,proxy_html" is working but there is error:
Invalid response from http://www.my-domain.com/.well-known/acme-challenge/.... 500 and 404
Re-enable the disabled modules is working only, when script is running succesfull, if not, i have to enable it manually.
The webspace is not available with disabled proxy modules, because apache wants to follow the apache directives. Is there any idea to disable apache directives in ispc when script is running?
If any Redirect in ISPC is configured, then script does not work too.
Did you get it to work meanwhile?