Changing default settings for user's web sites

Apr 30, '03 09:57:00AM

Contributed by: charlesa

When a new user is created, their home directory structure is based on the files and directories in /System -> Library -> User Template. But what about the user-specific files that live outside of the User's home directory?

For instance, the user's Apache configuration files are created inside /etc -> httpd -> users for each new user, based on a string resource in the Admin.framework.

Edit /System -> Library -> PrivateFrameworks -> Admin.framework -> Resources -> httpuserconfig.string to change the default values for a new user's personal websites. By default, this file contains:

<Directory "%@/Sites/">
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

So, if you want to disable MultiViews or allow htaccess overrides by default (for new users), you can adjust the default values here.

As with /System -> Library -> User Template, it's highly unlikely that Apple will provide .applesaved versions of this file when it updates the Admin.framework version. Back your changes up, or use a symbolic link to your backup to keep from losing your changes.

Read the rest of the hint for examples of the symlinks...

% sudo cp -p \
   /System/Library/PrivateFrameworks/Admin.framework/Resources/httpuserconfig.string \
   /etc/httpd/httpuserconfig.string

% sudo mv \
   /System/Library/PrivateFrameworks/Admin.framework/Resources/httpuserconfig.string \
   /System/Library/PrivateFrameworks/Admin.framework/Resources/httpuserconfig.string_10.2

% sudo ln -s \
   /etc/httpd/httpuserconfig.string \
   /System/Library/PrivateFrameworks/Admin.framework/Resources/httpuserconfig.string

% bbedit /etc/httpd/httpuserconfig.string
(Or wherever you keep your edits of Apple-supplied resources.)

Comments (0)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20030425133057140