• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 434
  • Last Modified:

.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
0
kenjaW
Asked:
kenjaW
  • 5
  • 3
  • 3
1 Solution
 
SteveNetwork ManagerCommented:
yeah .. but you've set

ServerRoot "/etc/apache2"

not 'var/www'

change your ServerRoot and reload apache and try again..
0
 
objectsCommented:
are you sure that conf is getting loaded?
Put an invalid directive in there and reload apache to test

0
 
kenjaWAuthor Commented:
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.  


0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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

you need a DocumentRoot directive

DocumentRoot "/var/www"
0
 
SteveNetwork ManagerCommented:
and then change your
<Directory /var/www>
   AllowOverride All  
</Directory>

to be

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

check the config in there

0
 
objectsCommented:
and in conf.d directory, and sites-enabled directory

0
 
kenjaWAuthor Commented:
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!!!  




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

0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 5
  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now