Not able to start Apache HTTP Server on Cent OS 6.4 - apache

While starting Apache tomcat, am getting error Starting httpd: Syntax error on line 3 of /etc/httpd/conf/httpd.conf: Invalid command 'AddHandler', perhaps misspelled or defined by a module not included in the server configuration I am using Cent OS 6.4 . I used the command service httpd start for starting the server.

You are trying to use Apache HTTP server configuration file with Tomcat.
Tomcat has it's own config files in TOMCAT-HOME/conf/ directory.
If you're actually talking about Apache HTTP, not Tomcat, you may get this error if there's no mime_module. Run httpd -M command to check if mime_module present or not.

Related

Invalid command 'RemoteIPProxyProtocol' (httpd 2.4.6) when running httpd behind HAproxy in tcp mode

I'm trying to setup PROXY protocol between a HAproxy acting as a load-balancer (tcp mode) and httpd (2.4.6)running behind. The objective is to get the "real" client IP addresses on the httpd-side.
In haproxy.conf the keyword send-proxy has been put in the selected backend.
The line:
LoadModule remoteip_module modules/mod_remoteip.so
has been added to httpd config file.
The directive RemoteIPProtocolAddress On has been set in the httpd virtualhost configuration file.
However, when reloading/restarting httpd the following errors appears:
[root#XXXXXXXXX conf.d]# systemctl status httpd
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: enabled)
Active: failed
[...]
Invalid command 'RemoteIPProxyProtocol', perhaps misspelled ...
Looking at the mod_remoteip source code for httpd 2.4.6, it appears the directive RemoteIPProxyProtocol does not exist anymore.
I'm not sure to understand how the versioning works. For instance I can see the RemoteIPProxyProtocol directive exists in mod_remoteip 2.4.43 but not in mod_remoteip 2.4.0.
How can I workaround this issue ? E.g. compiling another mod_remoteip version ? Downgrading httpd? Other?
Thanks.
Happened to meet the same problem, and after checking the documentation:
RemoteIPProxyProtocol is only available in httpd 2.4.31 and newer
I'm currently running Apache/2.4.29 on Ubuntu 18.04 and Apache/2.4.41 on Ubuntu 20.04, it works with 2.4.41.

Apache2.4.27 could not find ssl_module in mod_ssl.so

I am trying to setup a local https server using Apache2.4.27.
I have followed the instruction given on this website how to setup SSL on Apache.
When I uncomment LoadModule ssl_module libexec/mod_ssl.so on my Apache httpd configuration, I got the following error when I tried to restart my Apache server:
httpd: Syntax error on line 141 of /usr/local/etc/apache2/2.4/httpd.conf: Can't locate API module structure `ssl_module' in file /usr/local/opt/httpd24/libexec/mod_ssl.so: dlsym(0x7fe0a1c07080, ssl_module): symbol not found
I have confirmed that there is mod_ssl.so file inside my httpd's libexec folder.
I wonder where did I go wrong, since fresh installation of openssl and apache could not help me to solve this problem.

Apache httpd is not restarting in centos

I install Zend server CE 5.6. With that Apache is installed automatically. Now I want to restart Apache server then it is showing error
click here for image to see exact error
any help
why i cannot restart apache httpd service.....?
Well you got some syntax error in httpd.conf and zedserver_php.conf.
For libphp5.so, check if the user apache can access to usr/local/zend/lib/apache2/libphp5.so.
First look, I think you have some error in httpd.conf and zedserver_php.conf and that apache can't access to httpd.conf and zedserver_php.conf.

How to configure tomcat and apache

I have to configure Apache httpd server with Tomcat. I have followed this tutorial and I am getting this error
D:\myproject\apache\bin>httpd -k start
httpd: Syntax error on line 560 of D:/myproject/apache/conf/httpd.conf: Syntax e
rror on line 3 of D:/myproject/tomcat/conf/mod_jk.conf: Cannot load D:/myproject
/apache/modules/mod_jk.so into server: The specified procedure could not be foun
d.
I couldn't sort out first, that I was getting version error. Most probably I am trying to insert 32 bit mod_jk to 64 bit OS. If any one have well-configured Apache httpd server and tomcat please share it.
mod_jk obliges two substances:
mod_jk.xxx - The Apache HTTP Server module, contingent upon your working framework, it will be mod_jk.so, mod_jk.nlm or MOD_JK.SRVPGM (see the fabricate segment).
workers.properties - A record that portrays the host(s) and port(s) utilized by the specialists (Tomcat forms). A specimen workers.properties can be found under the conf registry in the source download.
Additionally as with other Apache HTTP Server modules, mod_jk ought to be initially introduced on the modules catalog of your Apache webserver, ie :/usr/lib/apache and you ought to overhaul your httpd.conf record. For More Visit http://www.pillenpalast.com/

How to debug mod_ldap in Apache

I am trying to debug an apache to ldap connection. The Apache server just reply with an Error 500 in the access.log file. I do not have any error in the error.log file.
I have seen that the LDAPLibraryDebug Directive is only available in Apache 2.4 and I am using Apache 2.2. Any ideas on how add more debug messages in the error log?
You can add "LDAPLibraryDebug" to a 2.2 server with this debug module:
https://github.com/covener/apache-modules/tree/master/mod_ldap_debug
To debug mod_ldap (and mod_authz_ldap) you need to have both services (Apache and LDAP) in debug mode.
For Apache use configuration parameter in sequence :
LogLevel debug
More info available on follow URL https://www.loggly.com/ultimate-guide/apache-logging-basics/
For LDAP service (if you use OpenLdap) stop standard service and start OpenLdap in foreground debug mode with (example):
slapd -d 128
More info available on follow URL https://www.openldap.org/doc/admin24/runningslapd.html