I'm using Mac OS X's built in Apache + PHP with MySQL. Everything works perfectly, except for my pretty %postname% permalinks — they just won't work. I have obviously enabled mod_rewrite and set the AllowOverride setting to All on my httpd.conf file. In case there's anything I can do (I really don't want to run MAMP), is there any programmatic way to use default permalinks on localhost using the very same template files?

2 Answers 2


Your /etc/users/{username}.conf should look like this:

<Directory "/Users/username/Sites/">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride All AuthConfig
    Order allow,deny
    Allow from all

You also have to change the name Apache runs under to be able to save the .htaccess rules and use the media uploader etc...

<IfModule !mpm_netware_module>
<IfModule !mpm_winnt_module>

User chris
Group admin #or you can use staff


The AllowOverride is listed a couple of times in httpd.conf make sure you changed the right one or both. One is the default setting and the other is for Library/WebServer/Documents which you should change to whatever server document root your using.

Apache has to be restarted for any changes to take affect. sudo apachectl restart

Also see How to Install Apache and PHP on Mac OSX for more details.

  • Thanks, Chris! One question, though: where should I add that second <IfModule> code? Right after the first one, inside my .conf user file?
    – João
    Commented Apr 26, 2011 at 21:12
  • It should be already there towards the beginning of the file with the user and group set to _www. It's surrounded by comments that I removed to paste in here.
    – Chris_O
    Commented Apr 26, 2011 at 21:25

there are two conf files for the built in apache, one for your username, which may be setting allowoverride to none.

  • Thanks, Milo. I just got to /etc/users/[username].conf and set AllowOverride to "All" as well. Let me reboot and see if it works already.
    – João
    Commented Apr 26, 2011 at 16:32
  • Nope, it didn't work. Any more suggestions?
    – João
    Commented Apr 26, 2011 at 17:42
  • do you have an .htaccess file with the proper rewrite rules?
    – Milo
    Commented Apr 26, 2011 at 17:49
  • Perfect, that's what was missing. Thanks, Milo! :)
    – João
    Commented Apr 27, 2011 at 11:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.