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.

This is what I added in /etc/apache2/sites-available/default (corresponding to Apache docs this automagically is changed and in /sites-enabled/000-default):

<VirtualHost *:80>
    ServerAdmin webmaster@localhost

    DocumentRoot /var/www/
    <Directory />
            Options FollowSymLinks
            AllowOverride None
    </Directory>
    <Directory /var/www>
            <Files *.db>
                    Order allow,deny
                    Deny from all
            </Files>
            Options Indexes FollowSymLinks MultiViews +ExecCGI
            AddHandler cgi-script .cgi .pl
            AllowOverride None
            Order allow,deny
            allow from all
    </Directory>

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
            AllowOverride None
            Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
            Order allow,deny
            Allow from all
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog ${APACHE_LOG_DIR}/access.log combined

Problem is that every time I enter somefilename.db in the address bar, the file starts downloading, when it should not. Tried and a <FilesMatch> without result. Any ideas?

Edit: Putting the directive in .htaccess file for directory does not work too! Apache is 2.2-mpm-prefork on Ubuntu 13.04 AMD64

share|improve this question
    
Just to be sure, did you reload apache after changing the configs? –  becomingwisest Jun 30 '13 at 15:03
    
Yes, service apache2 stop && service apache2 start –  1000Gbps Jun 30 '13 at 16:09

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.