Frank Herrman

RSS

Posts tagged with "development"

Dec 4

MacOS Lion permissions and apache .htaccess

Something I have been dealing with a couple of times are permission denied errors by Apache in MacOS. Besides the usual httpd-conf each user has his/her own configuration to. Just take a look in /etc/apache2/users and fix permissions there:

  • Open terminal (type ‘terminal’ in spotlight)
  • Type ‘cd /etc/apache2/users’ and press return
  • Type ‘sudo vim <yourusername>.conf’ and press return. If you are not sure about your username, type ‘ls’ to see what files are available.
  • Type in your password and press return.
  • This file should contain something like:
<Directory "/somedir">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

If not, press ‘i’ to be able to change it. Don’t forget to change the directory (/somedir) to the webroot. Press escape when you are done and type ‘:w’ to save the file. Type ‘:q’ to exit VIM.

Restart Apache (in system settings choose ‘sharing’ and uncheck and re-check the checkbox for webserver)

You are done!