DirectoryIndex problem

Discussion in 'Server Operation' started by mitho7, Jul 16, 2011.

  1. mitho7

    mitho7 Member

    Hello Friends,

    I'm using Debian GNU/Linux 6.0.2 (squeeze) and Apache 2.2. I have set the virtual hosting as per the example

    My site comes if i type full url ( but if i do not use index.html ( comes up page cannot display. I have default site set up which works ok. if i type the ip address ( it can read the index.html.

    I have dir module loaded. also have set up the DirectoryIndex index.html


    <IfModule mod_dir.c>
              DirectoryIndex index.php index.html index.cgi index.xhtml index.htm
    under sites-available i have default:
    <VirtualHost *>
            ServerName no_vhost_entry:80
            ServerAdmin [email protected]
            DocumentRoot /var/www/html/default
            <Directory />
                    Options FollowSymLinks
                    AllowOverride None
            <Directory /var/www/html/default>
                    Options Indexes FollowSymLinks MultiViews
                    AllowOverride Limit
                    Order allow,deny
                    allow from all
            <IfModule mod_headers.c>
                    Header set Cache-Control no-cache
            # Possible values include: debug, info, notice, warn, error, crit,
            # alert, emerg.
            LogLevel warn
            CustomLog /var/log/apache2/access.log combined
            ErrorLog /var/log/apache2/error.log
    under sites-available i have
    <VirtualHost *>
            ServerAdmin [email protected]
            # Indexes + Directory Root.
            DirectoryIndex index.html
            DocumentRoot /home/www/
            # CGI Directory
            ScriptAlias /cgi-bin/ /home/www/
            <Location /cgi-bin>
                    Options +ExecCGI
            # Logfiles
            ErrorLog  /home/www/
            CustomLog /home/www/ combined
    Just want to get some light here :)

  2. mitho7

    mitho7 Member

    i feel so stupid now. it is working fine. It's my browser mozilla, i clear the cache and working ok.
  3. eyeoncomputers

    eyeoncomputers New Member

    For what it's worth, I have had times where there were i would get "permission denied", even though i thought everything was set up correctly. Only to find out i had the wrong selinux context set on my index file. This is a nook that can often be a hard one to check because may forget about it -- although it not directly related to your issue i am in hope that someone would read this thread one day and use this bit of info to solve their problem :)

Share This Page