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

Re: index.html

On Monday 01 May 2017 11:55:49 Tony Baldwin wrote:

> On 04/30/2017 08:26 PM, Gene Heskett wrote:
> > Greetings;
> >
> > Imagine my surprise when I looked at /var/www/html/index.html,
> > and found that somehow, it was native to a PCLos install I was
> > running half a decade or more ago!
> >
> > Now, do we have a script that will rebuild a new index.html for the
> > defined root of the server, and which WILL access the
> > /var/www/html/gene directory? This should restore the whole site to
> > http compatibility.
> >
> > Right now, with out without that file, the subdir "gene" isn't
> > accessible.  Cannot be found is the message.
> >
> > Cheers, Gene Heskett
> nope. You've got to write or create your own index, unless you install
> something that generates one, such as dokuwiki, or wordpress, or any
> of a myriad of other CMS, (micro)blogging, social networking, or wiki
> platforms, forums or gallerys...the possibilities are nearly endless.
> If you just want to list the directories contents, try putting in an
> index.php with something like this in it:
> <html>
> <body>
> <ul>
> <?php
>     // loop through files and list them
>     $path = "/var/www/html/gene/";
>     $dir_handle = @opendir($path) or die("Unable to open $path");
>     while ($file = readdir($dir_handle)) {
>           if($file == "." || $file == ".." || $file == "index.php" ||
> $file == "private" || $file == ".htaccess" || $file == "robots.txt" ||
> $file == ".index.php.swp" )
>                   continue;
>           echo "<li><a href=\"$file\">$file</a></li>";
>   }
>   closedir($dir_handle);
> ?>
> </ul>
> </body>
> </html>
> You'll have to have php5 or better installed.

My web site is very simple, text and pix. So this 82 yo old fart can 
usually maintain it himself. No php, no databasie stuff at all.

The closest to high level stuff is that the pix galleries were created 
using jigl, so when you visit one of those pages, you get a screenfull 
of thumbnails, clicking on one of them brings up a pretty compressed but 
full screen image.  Clicking on many of those a second time will get you 
the original, straight out of the camera version of that image.  Those 
directories with mixed text & images are presented as a directory 
listing, but you can click on an image and get it, or .pdf's and such 
are offered for downloading when clicking on the directory entry.

Its a pretty "stable" site. If I add something, the link gets posted on 
the mailing list that applies so folks interested in one of my cnc 
machines will know about it, but I don't take out adds in the paper 
about it.

> This is essentially how I built http://tonybaldwin.me/pages/
> and various other pages on my site, including
> http://tonybaldwin.me/images/
>   only that has
>   $path = "/path/to/www/images/";
> ....
> <p><a href=\"$file\" target=\"_new\"><img src=\"$file\"
> style=\"max-width:200px;\"><br />$file</a>
> because that dir is full of images, so I have the index show a
> thumbnail, linking to the larger image.
> tony

Cheers, Gene Heskett
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>

Reply to: