Loading passenger_module in Apache - apache

I'm having problem loading passenger_module into Apache.
# /usr/local/apache/conf.d/passenger.conf
LoadModule passenger_module modules/mod_passenger.so
<IfModule mod_passenger.c>
PassengerRoot /usr/lib/ruby/1.8/phusion_passenger/locations.ini
PassengerRuby /usr/bin/ruby
PassengerInstanceRegistryDir /var/run/passenger-instreg
</IfModule>
Since I can't find modules/mod_passenger.so relative to the above config file, I specified the mod_passenger file that I found somewhere else which is at /usr/lib64/httpd/modules/mod_passenger.so. So the new config would be:
LoadModule passenger_module /usr/lib64/httpd/modules/mod_passenger.so
<IfModule mod_passenger.c>
PassengerRoot /usr/lib/ruby/1.8/phusion_passenger/locations.ini
PassengerRuby /usr/bin/ruby
PassengerInstanceRegistryDir /var/run/passenger-instreg
</IfModule>
Running service httpd restart yield me this error:
httpd: Syntax error on line 28 of /usr/local/apache/conf/httpd.conf: Syntax error on line 1 of /usr/local/apache/conf/includes/pre_main_global.conf:
Syntax error on line 3 of /usr/local/apache/conf.d/passenger.conf: Cannot load /usr/lib64/httpd/modules/mod_passenger.so into server: /usr/lib64/httpd/modules/mod_passenger.so: undefined symbol: ap_escape_html
It's actually loaded on the top of the apache config.
By the way, if I do:
/usr/bin/passenger-config validate-install
I'll get:
You are about to validate Passenger against the following
Apache installation:
Apache 2.4.16
apxs2 : /usr/bin/apxs
Executable: /usr/local/apache/bin/httpd
However, 1 other Apache installation(s) have been found on your system:
Apache 2.4.16
apxs2 : /usr/local/apache/bin/apxs
Executable: /usr/local/apache/bin/httpd
If I do chose y, I'll get:
* Checking whether this Passenger install is in PATH... ✓
* Checking whether there are no other Passenger installations... ✓
* Checking whether Apache is installed... ✓
* Checking whether the Passenger module is correctly configured in Apache... ✓
It'd be great if you guys can shared some light on this issue. Feel free to ask more info if you have to. Thanks in advance.
I'm using centos-release-6-8.el6.centos.12.3.x86_64

I am running Centos 7, Apache 2.4 and Passenger 5.0.28 all installed with yum. I am running passenger as an apache module.
You have Centos 6 and it looks like your apache is a custom install, however I thought going through my config files might help.
The passenger config on my server is split between:
# /etc/httpd/conf.modules.d/10-passenger.conf
### Begin automatically installed Phusion Passenger load snippet ###
LoadModule passenger_module modules/mod_passenger.so
### End automatically installed Phusion Passenger load snippet ###
and
# /etc/httpd/conf.d/passenger.conf
### Begin automatically installed Phusion Passenger config snippet ###
<IfModule mod_passenger.c>
PassengerRoot /usr/share/ruby/vendor_ruby/phusion_passenger/locations.ini
PassengerRuby /usr/bin/ruby
PassengerInstanceRegistryDir /var/run/passenger-instreg
</IfModule>
### End automatically installed Phusion Passenger config snippet ###
I can see the module itself, seems to reside in both /etc/httpd/modules/mod_passenger.so and /usr/lib64/httpd/modules/mod_passenger.so.
All apache modules show up in both directories and all the files look the same.
Did you install passenger running passenger-install-apache2-module?
Any other messages in the apache log (usually /var/log/httpd/error_log)?

Related

/etc/apache2/modules/mod_mpm_prefork.so not found in docker image

When starting apache I get an error of AH00534: apache2: Configuration error: No MPM loaded
So I added the module:
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
/etc/apache2/modules/mod_mpm_prefork.so: cannot open shared object file: No such file or directory
apachectl -V | grep -i mp
returns:
Compiled using: APR 1.5.2, APR-UTIL 1.5.4
Server MPM: prefork
Server compiled with....
How am I meant to load the module? Is the path different perhaps (I'm using the docker image of php:5.6-apache-stretch.
I needed to include:
IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf
before loading the modules

Apache mod_ssl could not be loaded

Trying to enable the mod_ssl module on Apache 2.4.25, I get the following error:
httpd: Syntax error on line 129 of /ld01/otsweb/build/apache/httpd24.conf: Cannot load modules/mod_ssl.so into server: \t0509-022 Cannot load module /usr/local/apache24/modules/mod_ssl.so.\n\t0509-150 Dependent module libssl.so could not be loaded.\n\t0509-022 Cannot load module libssl.so.\n\t0509-026 System error: A file or directory in the path name does not exist.\n\t0509-022 Cannot load module /usr/local/apache24/modules/mod_ssl.so.\n\t0509-150 Dependent module /usr/local/apache24/modules/mod_ssl.so could not be loaded.
Line 129 is the LoadModule ssl_module modules/mod_ssl.so line in the httpd.conf file.
I have the same configuration running correctly on another server. That server does not have a libssl.so file on it, yet Apache with SSL is running.
Apache was configured with: (OpenSSL version is 1.0.2k from openssl.org)
./configure --enable-mods-shared="proxy proxy_http" --enable-auth-digest --enable-ssl --with-ssl=/usr/local/ssl/bin
Has anyone seen this same error?
With the release of OpenSSL 1.0.2l we decided to reinstall Apache from scratch, and everything is working correctly. A clean install of both seems to have cleared out the problem.

Mod_wsgi - configuration failed

I am trying to install mod_wsgi using with apache2 but i cant:
I placed the mod_wsgi.so file in C:\Apache24\modules directory
In httpd conf file
1) when i try to LoadModule wsgi_module modules/mod_wsgi.so and restart apache then apache cannot be started - I get an error "The requested operation has failed"
2) when i remove the previous line and add "WSGIScriptAlias /myapp C:/wsgi-scripts/myapp.wsgi" i get the same error
reinstalled python for all users and this resolved itself, I must have installed python on windows for "just me" before

Won't start httpd after upgrading to httpd2.4 : Can't load modules

I was required to update php5.3 to php5.5, which also resulted in upgrading httpd2.2 to httpd2.4. Now after i upgraded my httpd isn't starting, throwing error
/etc/httpd/conf/httpd.conf: Cannot load modules/mod_authn_default.so
/etc/httpd/conf/httpd.conf: Cannot load modules/mod_authz_default.so
/etc/httpd/conf/httpd.conf: Cannot load modules/mod_ldap.so
/etc/httpd/conf/httpd.conf: Cannot load modules/mod_authnz_ldap.so
/etc/httpd/conf/httpd.conf: Cannot load modules/mod_disk_cache.so
I commented the lines from httpd.conf which resulted to these
Starting httpd: AH00534: httpd: Configuration error: No MPM loaded.
I when to '00-mpm.conf' inside conf.modules.d and comment every mpm module but that didn't work. Also I did look at http://httpd.apache.org/docs/2.4/upgrading.html but couldn't figure out what changes are to be done.
Can any one suggest me a link to load this modules. Since no package is there I cannot install modules using yum install mod_name.
Apache httpd has 3 choices for MPM, and you have to select one.
You should not comment out all lines in 00-mpm.conf.
mpm_prefork is recommended if you use mod_php .
For example in your 00-mpm.conf,
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so

Apache server httpd exiting with error

Team,
I am trying to start httpd
$# service httpd start
Starting httpd: httpd: Syntax error on line 162 of /etc/httpd/conf/httpd.conf: Syntax error on line 2 of /etc/httpd/conf.d/proxy_ajp.conf: Cannot load /etc/httpd/modules/mod_proxy_ajp.so into server: /etc/httpd/modules/mod_proxy_ajp.so: undefined symbol: proxy_module
[FAILED]
Process got exiting as per above.
I am running this in RHEL 5.2 server.
I am new to httpd / apache .Please let me know how to debug this ?
Many Thanks,
-Rishal
First place to look, make sure the following exists in the httpd.conf file:
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
Remember the file mod_proxy.so must exist and contain the necessary permissions.
If it doesn't work, are you able to copy in the contents of your proxy_ajp.conf? It maybe useful to see line 162 (and surroundings) of your httpd.conf file too .