I’m running Wordpress certified by Bitnami on Google cloud VM instance, and I have trouble with setting cert for subdomain.
My site is under domain www.domain.com but my subdomain (set up as virtual host in /home/PROJECT/apps/wordpress/conf/httpd-vhosts.conf ) static.domain.com points to www.domain.com/wp-content/ so that I can server static content from cookieless subdomain.
SSL cert for domain.com work Ok, but problem is that I cannot generate certificate for subdomain because it says that type is unautorized.
Directory browsing is disabled for subdomain.
I think that permissions are problem. Can someone please help with this setup.
When I try to run
root@website-vm:/tmp/certbot# ./certbot-auto certonly --webroot -w /opt/bitnami/apps/wordpress/htdocs/ -d static.domain.com
I get error:
Plugins selected: Authenticator webroot, Installer None
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for static.domain.com
Using the webroot path /opt/bitnami/apps/wordpress/htdocs for all unmatched domains.
Waiting for verification…
Cleaning up challenges
Failed authorization procedure. static.domain.com (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://static.domain.com/.well-known/acme-challenge/Zutn_kd1W9_VJNRIOuQcEx1PFo98Xnx3pRwJC5wlxUQ: "
The following errors were reported by the server:
Domain: static.domain.com500 Internal Server Error
Detail: Invalid response from
To fix these errors, please make sure that your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the right IP address.
static.domain.com is resolved ok by web browser. If I create file test.txt under
www.domain.com/wp-content/test.txt I can see that file in browser.