Mac OSX 10.5 Server - Apache htaccess directory restrictions

| | Comments (1)

I'm setting up a media server in the anthropology department using Mac OSX 10.5 Server. With the demise of the C-Labs service, I wanted a secure way to make streaming video available for in-class use. The Mac OS X Leopard Server was an obvious choice.

Right now, I'm just using flat files and the Mac OSX Server built-in Apache server. In order to restrict the streams to just Yale students, I wanted to limit the contents of certain directories to just Yale IP addresses.

This should be easily done using .htaccess files. However, the default configuration doesn't have .htaccess services turned on (since it is server / file system intensive to do so). However, I couldn't for the life of me to get the Apache server to recognize my modifications in the /etc/httpd/httpd.conf file. ARGHH!!! It was almost as if it was ignoring it.


It turns out that Mac OSX Server 10.5 uses Apache 2.0 by default and the *real* configuration file is located in: /etc/apache2/httpd.conf

apache-logo.jpg

Why Apple didn't include a nice little README to this effect -- or symlink the old location to the new, I don't know. It's even more confusing as the majority of Mac OSX Server help pages on the net reference earlier versions of Mac OS X server, where the files are in the older directory.

In any case, I managed to modify the /etc/apache2/httpd.conf file and get local .htaccess files working.

My .htaccess files look something like this:

AuthUserFile /locationofmyhtpasswdfile/.htpasswd
AuthName "Please enter your userid / password for off-campus use"
AuthType Basic

<limit GET POST>
satisfy any
order allow,deny
allow from .yale.edu
require valid-user
</limit>
This seems to work, but I'd love to get more feedback from people with more experience with MacOSX Server.

1 Comments

Try using the Server Admin tool in osx server. Choose Web under your domain, choose the host and click options, check "Allow All Overrides". This should do the trick.

Jens

Leave a comment

New!: You can sign in using your Facebook, Google, OpenID, mixi, Yahoo, MovableType, or other third-party authentication system.


Type the characters you see in the picture above.

Monthly Archives

Sponsored Links

Powered by Movable Type 5.11

Sponsored by

 

Search

Sponsored Links

About this Entry

This page contains a single entry by Karen Nakamura published on February 5, 2009 2:00 PM.

Film: A Japanese Funeral was the previous entry in this blog.

Ripping region 2 DVDs to play back on Region 1 players is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

August 2014

Sun Mon Tue Wed Thu Fri Sat
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31