Root Directory shows Bitnami "Installed" page on non-SSL connections

Keywords: MODX - AWS - Technical issue - Other
bnsupport ID: 8797d7d0-4854-2074-c82e-6af1568cc42a
Description:
I have a MODX 2.7.2 instance running on AWS and created certs using the bncert tool. Everything is working great EXCEPT if someone attempts to connect to my main url using http, none of my .htaccess directives seem to be working correctly and the Bitnami installation page is displayed (e.g. http://verticalinvestments.us/ vs https://verticalinvestments.us). I’m a fairly novice Bitnami user so I don’t want to go changing too many files.

Ultimately, what’d I’d like to do is have the non-SSL url correctly force an SSL connection instead.

I do have other domains running on this server using the same MODX instance and these are working correctly (e.g. the fulcrumliving[dot]com domain resolves to https connections correctly).

Any thoughts or support on this would be appreciated.

I’ve temporarily fixed this issue by adding an index.php file in the htdocs folder in opt/bitnami/apache2 with a permanent redirect to the https site. However, I’d like to permanently fix this problem if there are any suggestions.

Hi @desmond,

Thanks for using Bitnami. Did you check this guide https://docs.bitnami.com/ibm/apps/modx/administration/force-https-apache/?

Regards,
Ibone.

Hi @Ibone. Thanks for the info. I did see that guide and, unfortunately, it doesn’t solve the problem. The issue is that the directives seem to be ignored and apache is serving the files at /opt/bitnami/apache2/htdocs rather than the document root specified in vhosts. As far as I can tell, the vhosts file is set up correctly (i.e. the directives for my other domains are working fine) but just not this one.

Hi @desmond,

Could you check this post of the community?

and check the configuration of modx/conf/httpd-vhosts.conf.

Regards,
Ibone.

It seems like this has solved the problem! I changed the ServerName in /opt/bitnami/apache/conf/httpd.conf from mydomainname:80 to localhost:80. The vhosts file was already set up correctly so once I made this change, Apache began serving the correct folder.

Thanks!

Hi @desmond,

I’m glad the problem is solved. I close the thread, do not hesitate to write us back if you have any other questions.

Regards,
Ibone