LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   AWS server running on ubuntu, http works https does not (https://www.linuxquestions.org/questions/linux-newbie-8/aws-server-running-on-ubuntu-http-works-https-does-not-4175637133/)

curtaincall 08-25-2018 09:53 PM

AWS server running on ubuntu, http works https does not
 
Hello all,

I have a registered GoDaddy domain that points in the DNS through the type A value to my Elastic IP on AWS.

I also used CertBot to obtain an SSL for that domain so https://mydomain DOES work, however, I installed WordPress on my server, and the WordPress uses JS files from https://<elasticIP> and THIS does NOT work.
(for example: https://<elasticIP>/wp-includes/js/jquery/jquery.js?ver=1.12.4)

BTW http://<elasticIP> DOES work.
(and so does: http://<elasticIP>/wp-includes/js/jquery/jquery.js?ver=1.12.4)

I checked using nmap - the port for https 443 is working:
Quote:

443/tcp open https
Please help, been struggling for a week. Is there ANY way around this problem?

Thank you

scasey 08-25-2018 10:34 PM

The certificate is tied to the domain name, not the IP address. Can you tweak WordPress to use the domain name?

curtaincall 08-25-2018 10:44 PM

Tweaking wordpress
 
Quote:

Originally Posted by scasey (Post 5895965)
The certificate is tied to the domain name, not the IP address. Can you tweak WordPress to use the domain name?


Thank you for replying so quickly!
Is that what I should do? I have no idea how, the files are all on the ubuntu server, I installed it there using a tutorial, but not sure how I can change WordPress' location from the IP to the Domain name.

In the WordPress Settings I did change the "Site Address (URL)" to the domain name.

But if I change "WordPress Address (URL)" from http://ElasticIP - it won't be able to find the WordPress files I think.

curtaincall 08-25-2018 11:23 PM

It works! THANKS
 
Quote:

Originally Posted by scasey (Post 5895965)
The certificate is tied to the domain name, not the IP address. Can you tweak WordPress to use the domain name?



OK! I figured it out,

I had to add:

define ('WP_HOME','http://domain-name');
define ('WP_SITEURL','http://domain-name');

to the file wp-config.php in /www/var/html/

Thank you so much for pointing in me in the right direction! :)

scasey 08-26-2018 03:52 AM

:thumbsup:


All times are GMT -5. The time now is 02:52 PM.