Unable to start Apache server [apache-2.2.29] - apache

I have installed Apache as root and provisioned port 7773 in my httpd.conf file.
When I try to start apachectl then I get the error below:
[root#iam-dev bin]# ./apachectl -k start
httpd: Syntax error on line 420 of /home/app/apache-2.2.29/conf/httpd.conf: Syntax error on line 9 of /home/app/apache-2.2.29/conf/webgate.conf: Cannot load /home/app/Middleware/Apache22_WebgateR2PS2_Home/webgate/apache/lib/webgate.so into server: /home/app/Middleware/Apache22_WebgateR2PS2_Home/webgate/apache/lib/webgate.so: undefined symbol: nzos_GetSSLSessionID

You need to set LD_LIBRARY_PATH env variable to point /home/app/Middleware/Apache22_WebgateR2PS2_Home/webgate/apache/lib and the Apache Home lib dir. Like,
export LD_LIBRARY_PATH=/home/app/Middleware/Apache22_WebgateR2PS2_Home/webgate/apache/lib:<Apache Instal Dir>/lib
Also, you can find out the libs that are not getting resolved using following command.
ldd home/app/Middleware/Apache22_WebgateR2PS2_Home/webgate/apache/lib/webgate.so
HTH,
Anil

Related

Unable to start apache webserver due to ld.so.1: httpd: libonssys.so: open failed

When I do the below I'm able to start and stop apache instance alright
$ sudo -u wsadm -I -H
$ cd /web/apps/perf/apache/2.4.41/https-harsh/bin
$ ./apachectl -k start
However, when I ssh directly to the destination host using wsadm user and try to start the instance I get the below error:
$ ./apachectl -k start
httpd: Syntax error on line 531 of /web/apps/perf/apache/2.4.41/https-harsh/conf/httpd.conf: Cannot load /web/apps/perf/apache/2.4.41/https-harsh/plugin_lib/lib/mod_wl_24.so into server: ld.so.1: httpd: libonssys.so: open failed: No such file or directory
I was suggested to source the profile so I did the below:
`. /home/wsadm/.profile
source /home/wsadm/.profile
However, I still get the same error starting apache webserver instance.
cat /home/wsadm/.profile
…..
.….
WLS_PLUGIN_HOME=/web/apps/perf/sjsws/webserver7/wlsplugins/wlsplugin-1.1
LD_LIBRARY_PATH_64=${WLS_PLUGIN_HOME}/lib:${LD_LIBRARY_PATH_64}
export WLS_PLUGIN_HOME LD_LIBRARY_PATH LD_LIBRARY_PATH_64
…..
As you can see the .profile does not even have apache folder mentioned for any of the variables or paths. Sorry, if I'm taking the thought process in the wrong direction by mentioning the contents of the .profile
Can you please suggest ?
It says it in the error: Syntax Error
httpd: Syntax error on line 531 of /web/apps/perf/apache/2.4.41/https-harsh/conf/httpd.conf: Cannot load /web/apps/perf/apache/2.4.41/https-harsh/plugin_lib/lib/mod_wl_24.so into server: ld.so.1: httpd: libonssys.so: open failed: No such file or directory
This should answer your question: https://www.experts-exchange.com/questions/29088492/Configuration-problem-with-weblogic-connector-module-mod-wl-24-and-apache-2-4-6.html

How to get Apache to point to correct httpd.conf file

I'm trying to set up Apache on my MacOS Mojave 10.14.2; When I run:
sudo apachectl configtest
I get:
httpd: Syntax error on line 70 of /usr/local/etc/httpd/httpd.conf:
Cannot load lib/httpd/modules/mod_authn_file.so into server:
dlopen(/usr/lib/httpd/modules/mod_authn_file.so, 10): image not found
Correct me if i'm wrong but shouldn't it go:
/private/etc/apache2/httpd.conf
How do I change that?
You have two ways to resolve the problem
Install mod_auth package (not sure how it is named in MacOS)
comment line 70 of your config file

mod_wsgi-express: error: Invalid command was specified

I am trying to run wsgi application (hello.wsgi) on localhost through apache24 with mod_wsgi module but it shows this:
cd c:/apache24/bin
mod_wsgi-express start-server hello.wsgi
Usage: mod_wsgi-express command [params]
Commands:
module-config
module-location
mod_wsgi-express: error: Invalid command was specified.
Please help me!
On Windows the start-server command is not available. Using pip install mod_wsgi on Windows is only for getting the mod_wsgi module compiled. Once you have it compiled, run:
mod_wsgi-express module-config
Copy the output from that into your Apache configuration file to have it load the mod_wsgi module. Then configure Apache manually to host your specific WSGI application.
See section "Connecting into Apache installation" in:
https://pypi.python.org/pypi/mod_wsgi
for more details about the module-config command.

installed mcrypt but still undefined function mcrypt_create_iv()

I have :
1- installed mcrypt
2- checked phpinfo(); and doubled checked that php.ini is my app config file.
3- got mcrypt path from my /usr/local which is /usr/local/Cellar/php53-mcrypt/5.3.29/mcrypt.so , and included it in my php.ini which is the ini file for my application like the following :
extension="/usr/local/Cellar/php53-mcrypt/5.3.29/mcrypt.so" .
4- restarted with sudo apachectl restart
and after restarting apache the error still appears :(
PHP Fatal error: Call to undefined function mcrypt_create_iv()
what am I missing here?

installing mod_headers on Linux, apache 2.2.21

Trying to install the mod_headers to be able to append a HTTP header with the Header directive. But the installation process doesn't show the header module as being installed.
Did the following steps. Switched over to the httpd installation and under the modules/metadata directory did:
apxs -c mod_headers.c
the so file is created under the metadata/.libs directory (not sure why). Added the module with:
apxs -i -a -n mod_headers ./metadata/.libs/mod_headers.so
Restarted apache and tried a dump of the modules but getting:
httpd: Syntax error on line 54 of /www/fkwiki/apache/conf/httpd.conf: Can't locate API module structure `mod_headers' in file /www/fkwiki/apache/modules/mod_headers.so: /www/fkwiki/apache/modules/mod_headers.so: undefined symbol: mod_headers
Got a warning in the installation of the module (i.e. apxs -i ....):
Warning! dlname not found in /www/fkwiki/apache/modules/mod_headers.so
Anybody else have the same problem?