Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have installed a Apache 2 (from webmin) server on Debian 6..

I have setup a virtual host on the server which works fine, but .htaccess doesn't work if you get access from the ip address and the directory is listed if no index.php is found? -> 403 forbidden -> gets access to the server

Why is .htaccess omitted when you get access from the servers ip address?


<Directory *>
    Options -Indexes FollowSymLinks

<VirtualHost *:80>
    DocumentRoot /var/www


order deny,allow
deny from all
share|improve this question
Where is your .htaccess located ? Are there any interesting messages in your logs ? – Iain Jun 30 '12 at 7:08
no nothing.. see updated question.. have put an include at the end of /etc/apache2/apache2.conf Include /var/ini/httpd.conf – clarkk Jun 30 '12 at 7:20
htaccess is placed in /var/www – clarkk Jun 30 '12 at 7:31
Strange set of edits: Is this a new question ? – Iain Jun 30 '12 at 9:20
No, it was the same question.. But I solved it by deleting the vhost in /etc/apache2/sites-available – clarkk Jun 30 '12 at 9:50

Maybe you only need to do an

/etc/init.d/apache2 reload
share|improve this answer

solved it by deleting the defalut vhost in /etc/apache2/sites-available/default

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.