Question

This relates to another question I asked earlier today.

I built SVN 1.6.2 from source. In the process, it has completely screwed up my dev environment.

After I built SVN, Apache wasn't loading. It was giving me this error:

Syntax error on line 117 of /private/etc/apache2/httpd.conf: Cannot load /usr/libexec
/apache2/mod_dav_svn.so into server: dlopen(/usr/libexec/apache2/mod_dav_svn.so, 10): no
suitable image found.  Did find:\n\t/usr/libexec/apache2/mod_dav_svn.so: mach-o, but
wrong architecture

It appears that SVN over-wrote the old mod_dav_svn.so and I am not able to get it to build as FAT, and I can't recover whatever was originally there.

I resolved this(temporarily?) by commenting out the line that was loading the mod_dav_svn.so and got Apache to start at this point.

However, even though Apache is running I am now getting this error when trying to access my dev sites:

Directory index forbidden by Options directive: /usr/share/tomcat6/webapps/ROOT/

I have Apache2 sitting in front of Tomcat6. I access my local dev site using the internal name "http://localthesite". I have had virtual directories set up that have worked until this SVN debacle.

Tomcat is installed at /usr/local/apache-tomcat, and webapps is /usr/local/apache-tomcat/webapps.

Our production servers deploy tomcat to /usr/share/tomcat6, so I have symlinks setup on my system to replicate this as well. These point back to the actual installation path. This has all been working fine as well.

None of our configurations for Apache2, Tomcat, or .htaccess have changed. Over the weekend, I performed a "Repair Disk Permissions" on the system. This was before I discovered the mod_dav_svn.so problem.

I have been reading up on this all morning and the most common answer is that there is an Options -Indexes set. We have this in a config file, but it was there before and when I removed it during testing, I still got the same errors from Apache.

At this point, I'm assuming I either totally borked the native Apache2 installation on this Mac, or that there is a permissions error somewhere that I'm missing. The permissions error could be from the SVN installation, or from my repair process.

Does anyone have any idea what could be the problem? I'm totally blocked right now and have no idea where to check next.

Was it helpful?

Solution

This may or may not be related to the "Options directive" issue you're having, but the key bit in that first error is

Did find:\n\t/usr/libexec/apache2/mod_dav_svn.so: mach-o, but wrong architecture

I'm having a similar issue between Apache and SVN, but with a different library. My memory's a little fuzzy on this, but I think awhile back Apple switched to 64 bit binaries for some stuff. Most libraries on Mac OS X will be either i386 or x86_64 architecture. You can find out the architecture by using the 'file' command, for example:

file /usr/libexec/apache2/mod_dav_svn.so

which might output

mod_dav_svn.so: Mach-O 64-bit dynamically linked shared library x86_64

If you compare the architectures of your svn and httpd executables and the mod_dav_svn plugin you might find a conflict.

OTHER TIPS

Try

grep -n Options /etc/httpd/*

To get all lines where there's an Options directive. If you have any line that has -Indexes in it then that might be it. You might also have to check for files. (In /private/etc/httpd/users/* I think..)

Another thing is the permissions. (Which sounds more likely here.) I believe Apache needs a+x on a folder to display an index of its contents. Try

ls -l /usr/share/tomcat6/webapps/

And look for

drwxr-xr-x  1 user  user  100 Jun 15 13:37 ROOT/
         ^

You might need to set it with

chmod a+x /usr/share/tomcat6/webapps/ROOT

I'm not sure about this as I haven't had the same problem myself. Hope it works!
cheers!

(Sidenote: This might not be what you're looking for but I can strongly recommend MacPorts -- it's a tool that allows you to install software (like apache, svn, mysql etc.) automatically with dependencies resolved into a sand box, so that your default Mac OS X is untouched. You can deactivate and activate software and thus easily try different versions etc. Link: www.macports.org)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top