You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For context, I have set up WordPress on Kubernetes using the Bitnami HELM chart. My goal is to be able to run a Kubernetes Job to execute a wp2static export.
The problem is that since executing containers as root in Kubernetes is discouraged, it prevents you from binding your web server (Apache) to ports 80/443. As an alternative, the container runs Apache on ports 8080/6443. To expose your website on ports 80/443 to the outside world, you then use an Ingress object, which basically is a TLS reverse proxy, to forward traffic to the container.
Considering this, when I run "wp2static detect" within my Wordpress container, I get this error:
'''
$ wp wp2static detect
[2023-08-02T16:58:01+02:00] Starting to detect WordPress site URLs.
[02-Aug-2023 14:58:01 UTC] PHP Fatal error: Uncaught WP2StaticGuzzleHttp\Exception\ConnectException: cURL error 7: Failed to connect to 127.0.0.1 port 443: Connection refused (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://127.0.0.1/robots.txt in /bitnami/wordpress/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticguzzle/src/Handler/CurlFactory.php:210
'''
After some research, I tried to find a workaround with this :
'''
$ wp --path=/ --http=https://127.0.0.1:6443 wp2static detect
Error: Failed to get url 'https://127.0.0.1:6443': cURL error 60: SSL certificate problem: self signed certificate.
'''
Unfortunately, I feel like I'm stuck here.
Do you see any easy workaround to this situation?
A potential workaround to address this would be to implement additional arguments into the wp2static CLI. One approach would be to allow users to set the address, port, and to bypass certificate verification directly from the command line.
For context, I have set up WordPress on Kubernetes using the Bitnami HELM chart. My goal is to be able to run a Kubernetes Job to execute a wp2static export.
The problem is that since executing containers as root in Kubernetes is discouraged, it prevents you from binding your web server (Apache) to ports 80/443. As an alternative, the container runs Apache on ports 8080/6443. To expose your website on ports 80/443 to the outside world, you then use an Ingress object, which basically is a TLS reverse proxy, to forward traffic to the container.
Considering this, when I run "wp2static detect" within my Wordpress container, I get this error:
'''
$ wp wp2static detect
[2023-08-02T16:58:01+02:00] Starting to detect WordPress site URLs.
[02-Aug-2023 14:58:01 UTC] PHP Fatal error: Uncaught WP2StaticGuzzleHttp\Exception\ConnectException: cURL error 7: Failed to connect to 127.0.0.1 port 443: Connection refused (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://127.0.0.1/robots.txt in /bitnami/wordpress/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticguzzle/src/Handler/CurlFactory.php:210
'''
After some research, I tried to find a workaround with this :
'''
$ wp --path=/ --http=https://127.0.0.1:6443 wp2static detect
Error: Failed to get url 'https://127.0.0.1:6443': cURL error 60: SSL certificate problem: self signed certificate.
'''
Unfortunately, I feel like I'm stuck here.
Do you see any easy workaround to this situation?
A potential workaround to address this would be to implement additional arguments into the wp2static CLI. One approach would be to allow users to set the address, port, and to bypass certificate verification directly from the command line.
For example, it could be something like this:
The text was updated successfully, but these errors were encountered: