1

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

I have setup a virtual host db.domain.com 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?

db.domain.com -> 403 forbidden
xxx.xxx.xxx.xxx -> gets access to the server

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

httpd.conf

<Directory *>
    Options -Indexes FollowSymLinks
</Directory>

<VirtualHost *:80>
    ServerName db.domain.com
    DocumentRoot /var/www
</VirtualHost>

htaccess

order deny,allow
deny from all
5
  • Where is your .htaccess located ? Are there any interesting messages in your logs ?
    – user9517
    Jun 30, 2012 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, 2012 at 7:20
  • htaccess is placed in /var/www
    – clarkk
    Jun 30, 2012 at 7:31
  • Strange set of edits: Is this a new question ?
    – user9517
    Jun 30, 2012 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, 2012 at 9:50

2 Answers 2

3

Maybe you only need to do an

/etc/init.d/apache2 reload
0

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .