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: mode xsendfile, how to load?
Author
sambache



Joined: 11 Feb 2014
Posts: 11

PostPosted: Mon 24 Feb '14 5:10    Post subject: mode xsendfile, how to load? Reply with quote

Hello all,

as Apache (2.4) is totally new to me and I just managed to get owncloud working, I need some advice from here. Searching the forum brought some info, but I am still stuck at some point.

I would like to install mode_xsendfile. Taking the download from here, I copied the file mod_xsendfile.so to the modules directory. The install manual which comes with it, says just "make install and start Apache". Nice for a newbie Smile

I am stuck at: do I load the module like the other ones with LoadModule xsendfile_module modules/mod_xsendfile.so ?
If I do, httpd -S gives me "Syntax error on line xy of ..\httpd.conf Cannot load modules/mod_xsendfile.so into the server. Specified procedure not found"

What I am doing wrong or what I am missing?
Or is it only configured in the virtual host container or in the .htaccess file if one chooses?
A few steps in the right direction wouldbe very much appreciated.

Johannes
Back to top
Anaksunaman



Joined: 19 Dec 2013
Posts: 54

PostPosted: Mon 24 Feb '14 10:50    Post subject: How to load mod_xsendfile or other optional Apache modules? Reply with quote

The steps should be fairly straight forward on Windows.

1) Assuming that you are using Apache Lounge binaries, grab the module zip that corresponds to the version of Apache you are using from:

http://www.apachelounge.com/download/

So, if you are using 'httpd-2.4.7-win32-VC11.zip' for your Apache binaries, you would grab 'modules-2.4-win32-VC11.zip' for the extra modules.

2) Extract the modules-x-x-x.zip file and copy the modules you wish Apache to load to your 'modules' directory under you root Apache installation (ex. "C:\Apache2.4\modules"). In this case you would select the 'mod_xsendfile.so' file. Do not place this file in a sub-directory of 'modules' (i.e. you should place it along side the other .so modules in the 'modules' directory).

Click below to see an example:

http://s29.postimg.org/mp32gedh3/optional_module.png



3) On Windows, open httpd.conf in your Apache installation directory (ex. "C:\Apache2.4\conf\httpd.conf") and find the section specifying the modules to load:
Code:
# Example:
# LoadModule foo_module modules/mod_foo.so
#
LoadModule access_compat_module modules/mod_access_compat.so
{...]

At the bottom of this section, add something like the following:
Code:
[...]
#LoadModule watchdog_module modules/mod_watchdog.so
LoadModule xml2enc_module modules/mod_xml2enc.so

# The following modules were added manually and not part of the standard distribution
LoadModule xsendfile_module modules/mod_xsendfile.so

The important line to add of course is
Code:
LoadModule xsendfile_module modules/mod_xsendfile.so
.
Save your changes. If you are wary of making mistakes, feel free to make a copy of httpd.conf prior to editing.

4) Restart Apache.

Assuming everything went well, Apache should have no trouble starting.


Troubleshooting

* If Apache will not start, open an administrative command prompt:
Code:
Start Menu -> Run -> type cmd.exe -> Hold ctrl+shift then, while continuing to hold, press enter and say yes to the UAC prompt

and navigate to your Apache /bin directory (ex. "C:\Apache2.4\bin") and run:
Code:
httpd.exe -k start

Take note of the error message.

* If the message says something like "%1 is not a vaid Win32 application", you have most likely mixed up the 32-bit and 64-bit binaries.
Back to top
Anaksunaman



Joined: 19 Dec 2013
Posts: 54

PostPosted: Mon 24 Feb '14 11:00    Post subject: How to load mod_xsendfile or other optional Apache modules? Reply with quote

Quote:
I am stuck at: do I load the module like the other ones with LoadModule xsendfile_module modules/mod_xsendfile.so ?
If I do, httpd -S gives me "Syntax error on line xy of ..\httpd.conf Cannot load modules/mod_xsendfile.so into the server. Specified procedure not found"


For your issue, the quick answer is yes, that is how you do it. The particular error your encountering is likely a compatibility issue (for some reason the module package you selected was not built for the version of Apache you are using). So I would double check this. As an additional precaution, if this is somehow NOT the issue, I would fall back to checking .so placement in step 2 above.
Back to top
sambache



Joined: 11 Feb 2014
Posts: 11

PostPosted: Mon 24 Feb '14 18:25    Post subject: Reply with quote

thank you for your quick response.

All the installation steps are done the way you explained. When enabled the module I get the error mentioned in my first post.

I am using Apache 2.4.7 VC10_win32 with the module mod_xsendfile-1.0-P1-win32.zip all from here http://www.apachelounge.com/download/win32/

There shouldn't be any incompatibility issues, I am assuming.
What else on info from my side is needed ?

Johannes
Back to top
Anaksunaman



Joined: 19 Dec 2013
Posts: 54

PostPosted: Mon 24 Feb '14 23:52    Post subject: How to load mod_xsendfile or other optional Apache modules? Reply with quote

Well, there shouldn't be any compatibility issues. As I run VC11 builds, I had to download the VC10 versions to test them out but nothing went awry.

If it isn't compatibility, it could be be corruption, in which case I would check the integrity of all the packages (either via checksums or simply re-downloading the file(s)). It seems unlikely, but it may be possible.

I suppose I would also make sure VC10 redistributable from Microsoft was properly installed. There is a link to the one you need on the downloads page you linked to above.

The other thing I would check would be the actual error.log. There may be additional information there even if httpd -S fails. Also, while there should be no reason that the httpd -S vs -k start should make a difference, I would run httpd -k start on the off chance that httpd -k start writes some useful information to the error.log httpd -S does not.

If nothing immediately stands out, and there isn't anything too sensitive in it, I would suggest posting the log either here (if it is short) or on http://pastebin.com (if it is very long) and linking to it here.
Back to top
sambache



Joined: 11 Feb 2014
Posts: 11

PostPosted: Wed 26 Feb '14 3:41    Post subject: mode_xsendfile working Reply with quote

Hello Anaksunaman,
got the module working. I "thought" to have the correct file, but I had downloaded a different file NOT from here. Embarassed

All is fine. Will work tomorrow on the configuration.

Johannes
Back to top
Anaksunaman



Joined: 19 Dec 2013
Posts: 54

PostPosted: Wed 26 Feb '14 5:20    Post subject: How to load mod_xsendfile or other optional Apache modules? Reply with quote

Glad to here you got things sorted out. Smile
Back to top


Reply to topic   Topic: mode xsendfile, how to load? View previous topic :: View next topic
Post new topic   Forum Index -> Apache