installing mod_headers on Linux, apache 2.2.21 - apache

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?

Related

How to install Apache on OmniOS

I am attempting to install Apache on OmniOS. I followed the instructions here: option 2 https://wiki.openindiana.org/oi/3.+Installing+software+and+package+management
Ran the command:
echo $PATH results in /opt/local/sbin:/opt/local/bin:/usr/gnu/bin:/usr/sbin:/sbin
curl https://pkgsrc.joyent.com/packages/SmartOS/bootstrap/bootstrap-2016Q4-x86_64.tar.gz | gtar -zxpf - -C /
pkgin -y update
pkgin -y install apache-2.4.6 resulted in the messages Calculating dependencies...done and then nothing to do
I can not find the apache service or configuration directory as they are described here: https://docs.joyent.com/public-cloud/instances/infrastructure/images/smartos/apache
/opt/local/etc/httpd The configuration directory for Apache
svcs pkgsrc/apache Checking service for Apache
Server Info:
uname -v results in omnios-r151026-d9b45886bd
Running x86
Also running SunONE webserver
Though incomplete, my commands did make a change. My Perl scripts can no longer find DBI.
Why does the Apache install say there is nothing to do? What am I missing?
UPDATE
Ran which apache2 resulted in no apache2
Ran pkgin list to list all installed packages. Only apache
reference is apache-maven-3.5.4
Ran find . -name '*apache*' in the following directories:
\etc nothing
\opt found:
vim, el, and elc files in SUNWspro
org-apache-tools-ant-module files and folder in netbeans/3.5V11/modules/patches
apache folder in SUNWwbsvr/plugins/java/samples/webapps/jstl/src/org which contains java files
vim, tag, el and elc files in sfw --- also an apache folder in sfw which contains readme/bash type files for apache/php and one so file
apache-maven-3.5.4 files/folders in local
org-apache-xml-resolver* files in sunstudio12.1
'\usr' found:
2 vims in share/vim/vim80/syntax
apache-fcgi.conf in lib/python2.7/vendor-packages/cherrypy/scaffold
'\var' nothing
As far as I can tell, the binaries have not been installed
I tried running pkgin -y install apache-2 and it worked. It installed apache-2.4.3. Perhaps apache-2.4.6 does not exist in the repository.
This mean apache is already installed on the Linux system. To run below command which will tell the location of the system binary.
which apache2
for the configuration folder look for below directory:
/etc/apache2

Gentoo install mod_proxy_balancer

I installed in Apache in Gentoo and i need to use it like a proxy but i am unable to install mod_proxy_balancer. If i restart apache it display the following:
apache2 has detected an error in your setup: AH00526: Syntax error
on line 4 of /etc/apache2/vhosts.d/jira.conf: Invalid command
'ProxyRequests', perhaps misspelled or defined by a module not
included in the server configuration * ERROR: apache2 failed to stop
Any suggestion how to?
May seems a easy question for Gentoo expert, but not for beginners.
Please create a new file if not existing:
nano /etc/portage/package.use/apache2
Add the line containing the following:
www-servers/apache apache2_modules_proxy_balancer apache2_modules_slotmem_shm apache2_modules_proxy slotmem_shm mod_proxy_balancer mod_proxy apache2_modules_lbmethod_byrequests apache2_modules_proxy_balancer apache2_modules_slotmem_shm apache2_modules_proxy apache2_modules_proxy_ajp apache2_modules_proxy_balancer apache2_modules_proxy_http
Please run the following command in order to update the packages:
emerge -avDU #world
The purpose of this file is to add the following modules when apache2 ( www-servers/apache ) will be installed with the following command:
emerge www-servers/apache
After apache is installed with the requested modules need to add ( -D PROXY )
nano /etc/conf.d/apache2
APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D LANGUAGE -D PROXY "
Now we should be ok with the apache modules.

nginx ldap module error

I was trying to include the LDAP module to nginx. I could add the module and make install nginx successfully, however, while trying to restart the nginx, I get the following error:
sudo /usr/local/nginx/sbin/nginx -c /var/www/conf/nginx.conf -t
nginx: [emerg] dlopen() "/usr/local/nginx/modules/ngx_http_auth_ldap_module.so" failed (/usr/local/nginx/modules/ngx_http_auth_ldap_module.so: undefined symbol: ngx_ssl_handshake) in /var/www/conf/nginx.conf:11
nginx: configuration file /var/www/conf/nginx.conf test failed
When I looked at the ngx_http_auth_ldap_module.c file, I found that there is a call to this function. I am not sure where is this function being called from. Is there any other library that needs to be installed?
I have already installed the following:
openssl-devel.x86_64
openldap-devel.x86_64
zlib-devel.x86_64
I figured it out that I wasn't configuring nginx with the http_ssl_module option.
To make it work, I re-configured the nginx as:
./configure --add-module=/path/to/ldap_module --with-http_ssl_module
And then issued make and install commands. The ngx_ssl_handshake error got removed.

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?