After days of hitting my head against this, I was able to get
passenger-install-apache2-module to work. Somewhat. At least it compiles.
1) Find a libcurl that works
Had to change the PATH
This found a different version of libcurl that had correct SSL support configured. NOTE: version 7.35.0, not the opt/bitnami/.../libcurl 7.45.0
* Checking for Curl development headers with SSL support...
curl-config location: /usr/bin/curl-config
Supports SSL: yes
Header location: /usr/include/curl/curl.h
Version: libcurl 7.35.0
If anyone knows how to do this better without using the PATH, perhaps using compiler/linker flags (maybe here: https://www.phusionpassenger.com/library/install/apache/customizing_compilation_process.html), please let me know.
2) force apache and aspx location (from above link)
apachectl -V returns
Server compiled with....
I couldn't figure out how to recompile apache with aspx resetting HTTPD_ROOT, or set passenger to see the conf path, so I did created the path it wanted and symlinked:
mkdir -p /bitnami/rubystackSecondDev-linux-x64/output/apache2
ln -s /opt/bitnami/apache2/conf
passenger-install-apache2-module now completes successfully
I setup /opt/bitnami/apache2/conf/bitnami/passenger.conf with the new correct values (after renaming original)
LoadModule passenger_module /opt/bitnami/rvm/gems/ruby-1.8.7-p371/gems/passenger-5.0.6/buildout/apache2/mod_passenger.so
And did all the correct vhosts stuff
What's not working:
When apache starts up, I can see in the error log:
[Fri Sep 16 01:20:23.962905 2016] [core:notice] [pid 5707:tid 140140553783104] AH00094: Command line: '/opt/bitnami/apache2/bin/httpd.bin -f /opt/bitnami/apache2/conf/httpd.conf'
App 10893 stderr: /opt/bitnami/rvm/gems/ruby-1.8.7-p371/gems/passenger-5.0.6/buildout/support-binaries/PassengerAgent: /opt/bitnami/common/lib/libcurl.so.4: no version information available (required by /opt/bitnami/rvm/gems/ruby-1.8.7-p371/gems/passenger-5.0.6/buildout/support-binaries/PassengerAgent)
libcurl and its path/version is still causing problems
The biggest problem is even though my rvm default ruby is 1.8.7, there's some config somewhere pointing to the original bitnami installed ruby:
[ 2016-09-16 01:22:40.0892 10731/7f7c254eb700 App/Implementation.cpp:287 ]: Could not spawn process for application /home/bitnami/myrailsapp/: An error occured while starting up the preloader.
Error ID: b8e2e577
Error details saved to: /tmp/passenger-error-YjH2R9.html
Message from application: ruby lib version (2.3.1) doesn't match executable version (1.8.7) (RuntimeError)
[ 2016-09-16 01:22:40.0925 10731/7f7c22612700 age/Hel/Req/CheckoutSession.cpp:252 ]: [Client 1-1] Cannot checkout session because a spawning error occurred. The identifier of the error is b8e2e577. Please see earlier logs for details about the error.
Thanks for reading, please reply.