Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
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

2 Answers 2

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

 
discard

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.