Azure Bitnami WordPress: Cannot get third-party SSL cert to be picked up by server - wordpress

I'm following this documentation to finalize SSL configuration, using a third-party-provided certificate, but having issues: https://docs.bitnami.com/azure/apps/wordpress/administration/enable-https-ssl-apache/
I've added the following entries to /opt/bitnami/apache/conf/bitnami/bitnami-ssl.conf, in order to replace the working LetsEncrypt certificates with my new ones. (domain names are obviously obfuscated in the file screenshot, but it does match filenames in the directory)
Here is a screenshot showing the directory where the certificates are held. Permissions look correct, I believe.
After getting the configuration in place, I restarted all Bitnami services, and even Apache explicitly, but this new cert doesn't seem to get picked up by the server/browser.
Did I miss something? Perplexed here....

Bitnami Engineer here,
You are editing the SSL certificates to use for the default VirtualHost of Apache. However, the WordPress app also has another VirtualHost for it. In order to use the new SSL certificates when accessing WordPress, you will need to edit the /opt/bitnami/apache/conf/vhosts/wordpress-https-vhost.conf file.
Note: I'll notify the Bitnami documentation team to update the documentation accordingly.

Related

How to fix a cloned AMI with another domain SSL certificate on it for Wordpress on AWS?

In 2018 I made a Wordpress site by using a Bitnami AMI for a AWS EC2. Fine developed a site and created another custom AMI of the finalized Wordpress site. This was for domain X.
Now in 2020 I wanted to duplicate that website by using this custom AMI for domain Y. I have created an EC2 based on that custom AMI and instance went online without problems.
The problem is now that I can not reach the site by its url, I got blocked by "This connection is invalid", I also see that certificate is still based on the domain of 2018, thus is invalid. So I think that the issue is caused by the SSL configuration based on domain X while it is iinitiated for domain Y. But since I am not able to reach the site neither the admin panel, I am wondering how I can disable the SSL/HTTPS enforcement so that I can reach the site and admin panel?
I do have access to SSH, so probably I should be able to do something from there? But totally not known with that type OS and usage via SSH.
Bitnami Engineer here,
As you created a snapshot of the 2018 instance, the new instance has the same configuration you had at that time. Please check the following items so you can update the certificates and the app's configuration to work properly using your new domain name:
The certificates are configured in the /opt/bitnami/apache2/conf folder by default. You probably substituted the ones we include with valid certificate files for your domain in 2018. You will need to substitute the server.crt and server.key now with the new ones.
https://docs.bitnami.com/aws/apps/wordpress/administration/enable-https-ssl-apache/
Regarding the WordPress configuration, we have configuration tool that takes care of updating the domain name in the database. Can you take a look at this guide?
https://docs.bitnami.com/aws/faq/configuration/configure-custom-domain/
You will basically need to run sudo /opt/bitnami/apps/wordpress/bnconfig --machine_hostname my-new-domain.com.
I also suggest you check the WordPress' configuration file (/opt/bitnami/apps/wordpress/htdocs/wp-config.php) to see if you edited the WP_HOME and WP_SITE parameters there.

Wordpress:Can't able to access Wordpress after migrate from http to https

I am converting my wordpress site to https from http.I am using aws machine(windows OS) and i got the free ssl certificate,but when i tried to access my site it shows "Forbidden You don't have permission to access / on this server." this error message.I am tried almost all the solution(Deleting htaccess file,plugins uninstall,changing httpd.conf etc) but none of them worked.Any one help me i really need this one.
Can you try to test it by removing htaccess file?
Also from your database phpmyadmin go to wp_options table and from there verify that you have https urls.
Also if it does not works then tru to rename plugins folder and then test it.
Also add Really Simple SSL plugin and test your site.

Wordpress wp-admin Redirects to EC2 domain

I'm trying to install my wordpress to AWS EC2.
I created my EC2 instance and send files to that. (and instance domain has ben blablabla.eu-west-1.compute.amazonaws.com)
I used aws certificate manager for my domain.
I used cloudfront for using ssl certificate and; values are:
origin: blablabla.eu-west-1.compute.amazonaws.com
cnames: mysite.com
But when I connect to mysite.com/wp-admin it redirects me to blablabla.eu-west-1.compute.amazonaws.com.
Yes, I tried to change siteurl and home variables. And it doesnt make any changes.
And other hand; when I try to connect with "mysite.com" it converts all files to http (buy when I try to connect wit blabla.eu... all files are https)
What should I make?
Can be various things but I assume (based on previous experience) that some strings in Wordpress still contain mysite.com.
Before you go any further, it's worth to note that you can migrate your domain mysite.com to cloudfront/ec2/acm.
But if you want to just switch to another domain what I usually do is that I install wordpress CLI https://wp-cli.org/ and then I run wp-cli search-replace mysite.com blablabla.eu-west-1.compute.amazonaws.com --all-tables. It's good to have a backup just in case something went wrong, but this worked for me multiple times without any issues.

wordpress "The provided host name is not valid for this server."

Moving an Wordpress SSL site to a dev server. Deleted the certificate. Change the domain name through mysql. Getting this error.
What else would I need to do to fix this? Something on my end through apache? Done this countless times with other non-ssl sites...I am missing something I know it...
Thanks guys. Appreciate your help.
This is a common Drupal error -- see https://drupal.stackexchange.com/questions/145286/what-does-the-provided-host-name-is-not-valid-for-this-server-mean .
I suspect that your web server is redirecting the request to a directory where a Drupal site is installed. Check your DNS A records and Apache configuration files (at /etc/apache2/sites-available on Ubuntu 18.04). Good luck!
Checklist While moving a WordPress installation from one server to another (different URL)
Update siteurl and home field in Database Table 'wp_options' with http version of the url.
Check .htaccess file and remove ssl redirect.
Check if any plugin is used to replace non-https url with https url. Then disable this plugin.
I just experienced this exact issue with a WordPress site and want to add a third solution on top of what #tgeller and #Bikram Pahi said.
Check that you have a self-signed certificate installed on your webserver or a purchased certificate. I solved this issue by installing a self-signed certificate and when re-opening the WordPress website, the error was no longer present.
Also, in my case, I enabled HTTPS in the site's URL settings.

How do I set up AWS Route 53 to handle an EC2 single instance domain

I have thoroughly reviewed both the Amazon Web Services documentation and many Stackoverflow posts related to my issue, but have not yet resolved it. My situation:
I have successfully set up:
an EC2 t2.micro instance with elastic IP, running Ubuntu 14.04.01 /
Apache2 / PHP / MySQL (LAMP)
WordPress 4.5 as a content management system
CiviCRM 4.1 as a constituent management app
I am able to access and run this configuration with the public DNS linked to the Elastic IP. I have a custom domain (mydomain.org) registered through Amazon Route 53 and have set up the necessary record sets (A, CNAME) to connect both mydomain.org and www.mydomain.org to the EIP. This configuration, accessed with HTTP, correctly serves the base page of the app, and I see what I expect from WordPress, with mydomain.org showing in the browser address window.
When I navigate to any other page, it breaks. I see the page, but the displayed URL is that of the EIP public DNS, not my custom domain. I suspect that rewriting the URL in the Virtual Hosts section of my provide a solution, but I haven't been able to determine the proper statements.
Further, I need to have this configuration support TLS / HTTPS. I have successfully obtained and installed the necessary certificates and set them up in my server configuration. I have edited the ssl.conf Virtual Hosts file, and have even been able, using HTTPS to successfully navigate to the base page of WordPress. It shows the basic HTML of the page, but all of the script driven formatting is missing. Again, navigating to any other page of the app breaks the TLS by using the EIP URL, not my custom URL.
I suspect the same solution to the initial issue will fix this issue, as well.
Thank you, in advance, for your advice and suggestions.
Bruce P pointed me in a good direction. I checked VirtualHosts in my .conf file; found it OK. Looked for httpd.conf without success, and reviewed my WordPress configuration, which is where I found the problem. The server information was not updated to reflect the changed URL. When I did that, all significant problems were resolved. Thanks, again, to Bruce P for pointing me in a good direction.
DVH

Resources