logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: cannot load mod_headers.so into server: Invalid argument
Author
chandrasekharmsc



Joined: 04 Feb 2016
Posts: 5

PostPosted: Thu 04 Feb '16 14:14    Post subject: cannot load mod_headers.so into server: Invalid argument Reply with quote

Request your inputs on this issue. Please help.

Added the below block for click jacking fix in “httpd.conf” of Apache web server(version2.0.55, 32-bit apache, HP-UX).

LoadModule headers_module modules/mod_headers.so
Header always append X-Frame-Options SAMEORIGIN


Post that, not able to re-start the server with below error:
cannot load abcweb/apache_new/modules/mod_headers.so into server: Invalid argument
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Thu 04 Feb '16 16:49    Post subject: Reply with quote

Is the path correct to that module? Is it a native module or did you download it somewhere?
Back to top
chandrasekharmsc



Joined: 04 Feb 2016
Posts: 5

PostPosted: Tue 23 Feb '16 15:35    Post subject: Reply with quote

Path is correct. that .so file was downloaded.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Fri 26 Feb '16 11:02    Post subject: Reply with quote

I guess that the magic number doesn't match with your apache magic number, so that apache doesn't load that module.

You can find out by /usr/sbin/httpd -M
I don't know HP-UX so maybe the path is a different one.
Back to top
chandrasekharmsc



Joined: 04 Feb 2016
Posts: 5

PostPosted: Wed 30 Mar '16 16:38    Post subject: Reply with quote

List of compiled in modules. 'mod_headers' is not part of this list.
-----------------------------------------------------
/usr/apache2055/bin>./httpd -l
Compiled in modules:
core.c
mod_access.c
mod_auth.c
mod_include.c
mod_log_config.c
mod_env.c
mod_setenvif.c
prefork.c
http_core.c
mod_mime.c
mod_status.c
mod_autoindex.c
mod_asis.c
mod_cgi.c
mod_negotiation.c
mod_dir.c
mod_imap.c
mod_actions.c
mod_userdir.c
mod_alias.c
mod_so.c
-----------------------------------------------------
Back to top
chandrasekharmsc



Joined: 04 Feb 2016
Posts: 5

PostPosted: Wed 30 Mar '16 16:45    Post subject: Reply with quote

Required response header('X-Frame-Options') not added to HTTP response by below configuration:

<IfModule mod_headers.c>
Header always append X-Frame-Options SAMEORIGIN
</IfModule>
Back to top
chandrasekharmsc



Joined: 04 Feb 2016
Posts: 5

PostPosted: Wed 30 Mar '16 16:47    Post subject: Reply with quote

Invalid command 'Header', perhaps mis-spelled or defined by a module not included in the server configuration

This error is result of commenting IfModule :

#<IfModule mod_headers.c>
Header always append X-Frame-Options SAMEORIGIN
#</IfModule>
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Thu 31 Mar '16 12:07    Post subject: Reply with quote

You need to load mod_headers in the apache config.

The config line should be

Code:

LoadModule headers_module modules/mod_headers.so
Back to top
klassic



Joined: 23 May 2016
Posts: 1

PostPosted: Mon 23 May '16 17:34    Post subject: Reply with quote

James Blond wrote:
You need to load mod_headers in the apache config.

The config line should be

Code:

LoadModule headers_module modules/mod_headers.so


Thanks for this post. I am new to Apache and everything online only said to add the Headers statement for x-frame-options. Nothing mentioned the headers module.
Back to top


Reply to topic   Topic: cannot load mod_headers.so into server: Invalid argument View previous topic :: View next topic
Post new topic   Forum Index -> Apache