Link to home
Start Free TrialLog in
Avatar of kenjaW
kenjaW

asked on

.htaccess file is being ignored

I'm configuring a new server based on an ubuntu 8.04 image.  I'm using apache 2.2.8 and am having a problem where the .htaccess files are being ignored by the server.  

The apache2.conf file is attached.  The file did not have AllowOverrides in it at all, so I was assuming that it defaults to "None", so I put the "AllowOverrides All" directive in that file under the /var/www directory where the .htaccess files reside.  Apache restarts without complaint, but it still ignores the .htaccess files.  

The other configuration files seem to be empty or do not contain any reference to AllowOverrides, so I'm not sure where the problem is coming from.  Any ideas?  
apache2-conf.txt
Avatar of Steve
Steve
Flag of Australia image

yeah .. but you've set

ServerRoot "/etc/apache2"

not 'var/www'

change your ServerRoot and reload apache and try again..
Avatar of Mick Barry
are you sure that conf is getting loaded?
Put an invalid directive in there and reload apache to test

Avatar of kenjaW
kenjaW

ASKER

I tried changing ServerRoot to 'var/www' and that didn't help.  The description of that variable is:

# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.

which if I understand it correctly should actually be /etc/apache2 and not /var/www

Then I put an invalid directive in the file and verified that apache would not restart and threw an error.  


yes you're correct.(My typo mistake). .. you havent got /var/www defined anywhere..

you need a DocumentRoot directive

DocumentRoot "/var/www"
and then change your
<Directory /var/www>
   AllowOverride All  
</Directory>

to be

<Directory />
   AllowOverride All  
</Directory>
are the .htaccess files readable by apache user?
can you access them using apache?
is apache serving pages ok otherwaise?
 
> Include /etc/phpmyadmin/apache.conf

check the config in there

ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kenjaW

ASKER

Found it.  It was in the sites-enabled directory.  There was a symbolic link to a file that contained an AllowOverrides None in it.  Thanks!!!  




Avatar of kenjaW

ASKER

Thanks.  I looked at that before, but for some reason I ignored it because it was a symbolic link.  
could be cause of your .htpasswd problem as well