ubuntu apache2 and htaccess files.

Posted on Saturday, March 20th, 2010 at 11:10 pm in Uncategorized.

If you are just trying to setup an apache2 server straight out of the box and want to modify add htaccess files it’s kind of different then how the apache instructions mention how to do so.

Here’s the thread I found through google on it.

http://ubuntuforums.org/showthread.php?t=47669

Follow orlando_nicks advice (posted 5 years ago). LOL.
The post is pretty old so I’ll cut & paste it here just in case it goes missing someday.

Found the solution!! Apache2 in general, or it might be specifically to Ubuntu, is configured slightly differently than Apache1.x.. at least from what I’ve seen in the default installs in RH, FC, Mandrake, etc (I’m not Linux or Apache expert).

I went to /etc/apache2/sites-available and edited the file default
There you’ll find:


NameVirtualHost *
<VirtualHost *>
ServerAdmin admin@site.com

DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
# This directive allows us to have apache2's default start page
# in /apache2-default/, but still have / go to the right place
# Commented out for Ubuntu
#RedirectMatch ^/$ /apache2-default/
</Directory></code>

oh and yay for the code tag not working.

Top