Results 1 to 4 of 4

Thread: Disable apache directory browsing in ubuntu 11.10

  1. #1
    Join Date
    Nov 2009
    Beans
    17

    Disable apache directory browsing in ubuntu 11.10

    Hi,

    I have a server with a 40.40.40.40 ip. When I access to http://40.40.40.40 it lists my virtual hosts directories. I do not want him to do that !

    I followed several tutorials but no one works for me. Many of them tell me to change the Options Indexes FollowSymLinks MultiViews line in the httpd.conf file for Options FollowSymLinks MultiViews (remove the Indexes option).

    The problem ? httpd.conf is blank. So I get to apache2.conf (intuition , not knowledge) and the line was not there.

    Any ideas ? Please help.

    Thanks in advance !

  2. #2
    Join Date
    Sep 2006
    Beans
    7,244
    Distro
    Lubuntu Development Release

    /etc/apache2/sites-available/default

    Look in /etc/apache2/sites-available/default

    httpd.conf is not used anymore and apache2.conf is for global settings, not vhost-specific settings.

  3. #3
    Join Date
    Nov 2009
    Beans
    17

    Re: Disable apache directory browsing in ubuntu 11.10

    You were right !

    I removed the word Indexes everytime it appears on the default config file in the sites-available folder and also from my virtuals. So when I get to http://40.40.40.40 I get a 403 forbidden.

    Lots of thanks !

  4. #4
    Join Date
    May 2005
    Beans
    3

    Re: Disable apache directory browsing in ubuntu 11.10

    To disable directory browsing:
    Code:
    sudo a2dismod autoindex
    sudo service apache2 restart
    Tested on 12.10

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •