Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apache (on OS X Lion) isn't reading .htaccess file

I'm using OS X Lion's built-in Apache server. I placed a .htaccess file in my personal Sites directory, but Apache isn't reading it. My username is tophtucker, so the file is in /Users/tophtucker/Sites/. But whether I make .htaccess valid or gibberish or just test or whatever, it has no effect. If .htaccess contains just "test", I should get an error when I go to localhost/~tophtucker/, but I don't.

.htaccess works in other directories (like subdirectories of Sites). AllowOverride is set to All in httpd.conf, and AccessFileName is set to .htaccess. It's just something about the Sites directory. Does Apache give it weird special treatment or something?

like image 719
Toph Avatar asked Dec 29 '11 00:12

Toph


1 Answers

OK, I figured it out:

When you're using personal sites with Apache, an additional configuration file is created in apache2/users/tophtucker.conf (or whatever your username is). AllowOverride in that configuration file was still set to None. I set it to All; problem solved!

like image 157
Toph Avatar answered Sep 22 '22 01:09

Toph