Keywords: General - Google Cloud Platform - Technical issue - Secure Connections (SSL/HTTPS)
bnsupport ID: 1
Description:
The ssl cert working good . But when login to website after login the SSL become not work and when press back it working fine .
My website in Google cloud and using bitnami and the ssl cert installed by bitnami tool .
Hi @dhari.kh
Thanks for using Bitnami!
We have a Support Tool that will gather relevant information for us to analyze your configuration and logs. Could you please execute it on the machine where the stack is running by following the steps described in the guide below?
Please note that you need to paste the code ID that is shown at the end.
Best regards,
Jose Antonio Carmona
Was my answer helpful? Click on
27ba2daf-e959-f5a7-0179-ae1d4301e1ec
Hi @dhari.kh
I have been briefly reviewing the report generated by the bnsupport-tool
and noticed that WP_HOME and WP_SITEURL are not configured to use the HTTPS protocol. Could you follow the steps below and see if that resolves the issue?
- Apply the following changes to your
/opt/bitnami/wordpress/wp-config.php
file:
...
- define( 'WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] . '/' );
+ define( 'WP_HOME', 'https://' . $_SERVER['HTTP_HOST'] . '/' );
- define( 'WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] . '/' );
+ define( 'WP_SITEURL', 'https://' . $_SERVER['HTTP_HOST'] . '/' );
...
- Restart the Apache service and access your site again:
$ sudo /opt/bitnami/ctlscript.sh restart apache
Best regards,
Jose Antonio Carmona
Was my answer helpful? Click on
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
Type: Bitnami Support Tool
Description:
Apply the following changes to your /opt/bitnami/wordpress/wp-config.php file: <------- (THIS COMMAND NOT WORKING)
...
- define( 'WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] . '/' );
+ define( 'WP_HOME', 'https://' . $_SERVER['HTTP_HOST'] . '/' );
- define( 'WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] . '/' );
+ define( 'WP_SITEURL', 'https://' . $_SERVER['HTTP_HOST'] . '/' );
Hi @dhari.kh
You will need a file editor to apply those changes. You can use nano
for instance to edit that file:
sudo nano /opt/bitnami/wordpress/wp-config.php
Best regards,
Jose Antonio Carmona
Was my answer helpful? Click on
I went to that file … So do i have to change or add the below commands:
- define( 'WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] . '/' );
+ define( 'WP_HOME', 'https://' . $_SERVER['HTTP_HOST'] . '/' );
- define( 'WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] . '/' );
+ define( 'WP_SITEURL', 'https://' . $_SERVER['HTTP_HOST'] . '/' );
The problem still present. The problem is when access the website all ok . no error in cert and all looks good . But when you login to the site ( Login because I have students login to the site to check their classes video ) when any one login the URL change it from domain name to IP Address and the cert error present .
Hello @dhari.kh,
I’m not sure if you were able to apply the changes that my colleague suggested. You only need to set the define
lines with https
as URL. As such, you will need to have the following in your wp-config.php
:
define( 'WP_HOME', 'https://' . $_SERVER['HTTP_HOST'] . '/' );
define( 'WP_SITEURL', 'https://' . $_SERVER['HTTP_HOST'] . '/' );
Could you modify your file to only include those lines? You can share with us a new bnsupportID after applying the changes.
Regards,
Francisco de Paz
This is the bnsupportID
f8a98b27-5a9b-3e19-1ca2-3db2f8e918ac
Hello @dhari.kh,
It looks like you left both http
and https
definitions for WP_HOME
instead of having only the https
definition for WP_HOME
and WP_SITEURL
like in the example I shared with you in my last post. Could you give it another look?
Regards,
Francisco de Paz
This might help to solve the issue . In this picture from WordPress should be these option URL domain not IP Address , I hope if we can fix in php this will be fix too
Hello @dhari.kh,
Going by the latest screenshot of your wp-config.php
file, you still have a typo on the WP_HOME
definition, it should be https://
instead of http://
. Could you check if that solves the issue?
Regarding your second screenshot, that shouldn’t be an issue. Nevertheless, you can check how to use the domain name directly in wp-config.php
in the following guide:
https://docs.bitnami.com/aws/apps/wordpress/administration/configure-domain/
Keep in mind that you will need to use https
always.
Regards,
Francisco de Paz