2

I've installed xsendfile on my mac and it is located in the apache modules. I've attempted to enable it via my htaccess file but I continually get an error. When I try to get a list of modules on my apache server via either terminal or php, it's not listed. Relevant Code/ Server Info listed below:

Server: Apache/2.2.21 (Unix)

Compiled and installed Via: apxs -cia -Wc,"-arch i386 -arch x86_64" -Wl,"-arch i386 -arch x86_64" mod_xsendfile.c

In Httpd.conf: LoadModule xsendfile_module libexec/apache2/mod_xsendfile.so is enabled

htaccess: XSendFile on XSendFilePath /path/to/file/

Error Message: Invalid command 'XSendFile', perhaps misspelled or defined by a module not included in the server configuration

I appreciate any guidance.

David

David
  • 21
  • 1
  • are you using default install or an additional install, i have in the past had problems with multiple installs. also more of a server fault question. – Grady Player Aug 17 '12 at 18:10
  • @Grady, thanks for your response. Please forgive my ignorance I believe this is an additional install but I'm not 100% sure. Is there a way to tell? – David Aug 19 '12 at 00:13
  • You can type : which httpd or httpd2 and which axps or apxs2 see it those match process list – Grady Player Aug 19 '12 at 16:38
  • @GradyPlayer, Thanks again, it looks like I'm still using the default install. By the way, should I move this question to Server Fault? – David Aug 20 '12 at 14:37
  • you will probably get more attention. – Grady Player Aug 20 '12 at 16:27

2 Answers2

0

I realise that this question is a year old, but for people looking in future the way to do this (on Mac OS X Lion at least) is:

sudo apxs -cia mod_xsendfile.c
Jamie Hollern
  • 154
  • 3
  • 15
0

I read somewhere else that you need to enable it by adding these line to the apache config, and that using an .htaccess file was not sufficient.

XSendFile on
XSendFilePath /absolute/path/to/files
I wrestled a bear once.
  • 22,983
  • 19
  • 69
  • 116