Re: Directory Index not displaying

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Igor, 
You wonder why I am editing files.  I am trying to learn how to make directory listings unique.  I am surprised at how difficult this has become.  (I recognize part of the problem is not knowing what I'm doing w/the man pages.)

I corrected the typo and added the meta line. Did a restart apache2. There was no change.

You made this note:
>So all you need to get a directory listing is:
>
>1. Optins +Indexes (in the directory command)
>2. You should NOT have any index file in that directory


I tried to add the lines (taken directly from the example on the Options page) to the default.conf file and most of my variations generate 'syntax' errors for both the autoindex.conf and the default.conf when I attempt a restart.
I can edit the default.conf file and simply add the lines from the Options page example w/o the enclosing <directive> lines and it will restart but still not change any display.

Isn't the 'directory command' you mention actually this file:  default.conf  ?

I'm sorry to confuse this.  I am seriously confused by the man pages.
I'm starting to think I need to re-install Apache.

I have read a huge number of web pages trying to figure this out.

Thanks for any insights you can provide.
stan

On Wed, Nov 23, 2011 at 8:53 PM, Igor Cicimov <icicimov@xxxxxxxxx> wrote:
  <body>
        <h1>README FILE</H1>
        p>This is the readme file</p>
  </body>


If the file is not displaying maybe is because of the wrong <p> tag above. The < is missing from <p> ...Firefox has couple of plugins that can show you errors like this one.

Also maybe try to include the following meta tag in the <head> section of the README.html to tell apache it is text/html file for sure:

<meta http-equiv="content-type" content="text/html;charset=utf-8">


 
On Thu, Nov 24, 2011 at 2:41 PM, Igor Cicimov <icicimov@xxxxxxxxx> wrote:
I'm not sure what you are trying to achieve here by modifying these files.

To get the directory listing, from mod_autoindex documentation:

"Automatic index generation is enabled with using Options +Indexes. See the Options directive for more details."


If you have a look at Options directive:

Indexes
If a URL which maps to a directory is requested, and there is no DirectoryIndex (e.g., index.html) in that directory, then mod_autoindex will return a formatted listing of the directory.

So all you need to get a directory listing is:

1. Optins +Indexes (in the directory command)
2. You should NOT have any index file in that directory





On Thu, Nov 24, 2011 at 8:26 AM, Stan Laughlin <stan.laughlin@xxxxxxxxx> wrote:
Folks,
I am running an Ubuntu 11.10 server w/Apache 2.2.
I am familiar with linux and command line but not familiar w/Apache.

When enter the server IP address like this to a browser URL (pretend IP here) :   10.10.10.10/doc/
It will list the default directory Index for the /usr/share/doc/  directory.  All very nice.

Then I edit autoindex.conf for these two values  "HeaderName HEADER.html" and "ReadmeName README.html"
Restart apache and refresh browser.

This is the HEADER.html
<html>
<head>
        <title>"STAN'S DOC INDEX"</title>
</head>
</html>


This is the README.html
<html>
<head>
        <title>"README FILE </title>
</head>
  <body>
        <h1>README FILE</H1>
        p>This is the readme file</p>
  </body>
</html>

The web page shows the "STAN'S DOC INDEX" title.  But there is no directory listing and there is no README info.

The 'dir.conf' file looks like this
<IfModule mod_dir.c>
          DirectoryIndex  HEADER.html index.html index.cgi index.pl index.php index.xhtml index.htm
</IfModule>

If I remove the HEADER.html text then the page reverts back to the default display and shows the directory index.

So...obviously the thing is picking up the HEADER.html but why isn't it picking up anything else?

I have been trying to make this work for several days.
I have read and re-read the autoindex and Directory module pages.  Because I'm new at this they are somewhat confusing.  A possible solution is the htaccess file but the mod page strongly recommends not going that route.

I would appreciate any suggestions.

Thanks.
stan

--
stan.laughlin@xxxxxxxxx
"Beer is always in season"





--
stan.laughlin@xxxxxxxxx
"Beer is always in season"

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux