# Apache seems to be ignoring .htaccess (fixed)

## Bigun

Here's what I have inside my .htaccess file

```
Options -Indexes
```

Yet indexes keep displaying.  Is there an option I have to enable in apache?

----------

## Peach

```
        # Simply allow all directives to be overridden in .htaccess

        AllowOverride All

        Order allow,deny
```

may be a quick search should have found something

ciao

----------

## Bigun

Still no dice.

----------

## Peach

 *bigun89 wrote:*   

> Still no dice.

 

that instruction has to be set in the httpd.conf file

the only one that you will need is: allowoverride

a quick search on google with "enable htaccess" gave as first result this page:

http://httpd.apache.org/docs/1.3/howto/htaccess.html

----------

## Bigun

Still no dice:

httpd.conf:

```
<Directory />

    Options FollowSymLinks

    AllowOverride All

    Order allow,deny

</Directory>

```

----------

## keyson

 *Quote:*   

> 
> 
> httpd.conf:
> 
> Kod:
> ...

 

Don't change that. You would not like someone to read your system.

Check the vhost config.

/etc/apache2/vhost.d/00_default_vhost.conf

(if it is the normal /var/www/localhost/htdocs you want to use)

And change the AllowOverride in that file.

 *Quote:*   

> 
> 
>         # AllowOverride controls what directives may be placed in .htaccess files.
> 
>         # It can be "All", "None", or any combination of the keywords:
> ...

 

Otherwise if it is the /home/user/public_html you need to edit this in httpd.conf.

 *Quote:*   

> 
> 
> #
> 
> # Control access to UserDir directories.  The following is an example
> ...

 

----------

## Peach

can you post the content of the .htaccess file you're trying to make work?

does access_log error_log report anything about it? you can find these logs into /var/log/apache/

----------

## Bigun

 *keyson wrote:*   

> Check the vhost config.
> 
> /etc/apache2/vhost.d/00_default_vhost.conf
> 
> (if it is the normal /var/www/localhost/htdocs you want to use)
> ...

 

That was it, I was editing the wrong configuration file.  Thanks..

----------

## HitMaker

Hi, I am trying to do the same But i don't know what else to do:

My /etc/apache2/vhosts.d/00_default_vhost.conf looks:

 *Quote:*   

> <VirtualHost *:80>
> 
>         ServerName localhost
> 
>         Include /etc/apache2/vhosts.d/default_vhost.include
> ...

 

But still showing the directory index. Some advise?   :Confused: 

----------

## HitMaker

Ok, I understood it incorrect. Placing the .htaccess in the /var/www with "AllowOverride None" worked!   :Smile: 

EDIT: nope, now nothing works xD   :Embarassed:  Ok, I think I got it!; thanks!!!!

----------

