8

When I upgraded my Lion Server to Mountain Lion, it seems that it removed my mod_xsendfile from apache.

I followed the instructions from this web site, but got stuck with a "No such file or directory" error. With some help from google i found this page that gave me the solution to this: "sudo ln -s /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/ /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain"

Looked good, but when I try to run "sudo apxs -cia mod_xsendfile.c" I get a "fatal error: 'apr.h' file not found" error.

Any ideas?

Community
  • 1
  • 1
einord
  • 2,278
  • 2
  • 20
  • 26
  • Sorry, still nothing new here. I even took the time to format and reinstall mac os x, but it didn't help. – einord Sep 08 '12 at 17:08
  • When I tried to download and install the Xcode Command Line Tools from the Preferences pane. And after that created the symlink ("sudo ln -s /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain"), it would install again. But now I have the problem that x-sendfile doesn't seem to be loaded after a restart. No error, nothing. But "LoadModule xsendfile_module libexec/apache2/mod_xsendfile.so" has been added to the httpd.conf. Hmm... wierd. – einord Sep 08 '12 at 17:55

1 Answers1

9

You need to re-install the Xcode command line tools:

xcode-select --install

You'll then likely need to accept the Xcode license agreement again:

sudo xcodebuild -license

Once you've done that (as well as your symlink for the toolchain) you should be good to go.

Sam Sehnert
  • 2,933
  • 1
  • 20
  • 25