Koozali.org: home of the SME Server

Directory Browsing (HTTP)

Jim Danvers

Directory Browsing (HTTP)
« on: October 14, 2003, 06:50:07 PM »
Scenario:  6.0b3 machine being used as a (seperate) imaging network to store ghost image files.   We'll call it the 'imaging server' on the 'imaging network'.  The imaging network's 'world' (internet) is the larger company production network.  So...  

... I have the sme machine external nic using a static address that conforms to our production addressing scheme, and am also pointing to our production dns and gateway in order to get out to the world.  The sme internal nic is using install defaults (192.168.x.x class c ) and is serving up dhcp to that same side (internal).  Our production network, fwiw, is a class b 172.16.x.x space.  We keep the image files off of the production wire primarily for bandwidth reasoning.

Objective:  I would like to be able to see (at a glance) what image files I have on the imaging server at any given time using a world readable / http accessible i-bay.   'World' in this case is only going to mean from the production network (and, of course, the sme internal net).

I have created the i-bay and defined it like so:

write = group, read = everyone
public access = entire internet (no passwd)
dynamic content = enabled

I learned via a search of these forums that I needed to rename / delete the index.html file and to turn on the dynamic content thingie.   I'm stuck there though as while I can now see the contents of the html directory...  that isn't what I want to see!  lol.....  I want to see the contents ../files in this i-bay.  So, I'm thinking to myself.....  ".... I'll just create a symlink and then I'll be able to see the images - yeah, that'll work!"  So I do --->  ln -s ../file pcimages and then I refresh the web browser and viola! - I can see the link (pcimages).  I click on in and....  go nowhere.  ;(  ( access denied )

I'm stuck...  can I do this, and if so - what additional steps am I going to need to do?

Thanks in advance guys...

-=- jd -=-

Jimbo

Re: Directory Browsing (HTTP)
« Reply #1 on: October 14, 2003, 08:21:06 PM »

Jim Danvers

Re: Directory Browsing (HTTP)
« Reply #2 on: October 14, 2003, 08:36:48 PM »
Thanks for the post jimbo (nice name btw...  
Forbidden
You don't have permission to access /pcimages/files/ on this server.

Internet explorer pops up its own page that says basically the same thing:

You are not authorized to view this page
You might not have permission to view this directory or page using the credentials you supplied.
--------------------------------------------------------------------------------
If you believe you should be able to view this directory or page, please try to contact the Web site by using any e-mail address or phone number that may be listed on the imaging home page.

You can click  Search to look for information on the Internet.

HTTP Error 403 - Forbidden
Internet Explorer

-=- jd -=-

Dan Brown

Re: Directory Browsing (HTTP)
« Reply #3 on: October 14, 2003, 08:41:27 PM »
You need to turn on the FollowSymLinks directive in httpd.conf for that ibay, which will probably require a custom template fragment.

Jim Danvers

Re: Directory Browsing (HTTP)
« Reply #4 on: October 14, 2003, 09:04:17 PM »
;(  Bummer... thats ok - I need to learn how to do that sort of stuff anyway (muck w/custom templates... )

Thanks Dan....  I'm off to google and try and learn where in the httpd.conf such an entry would live and then subsequently try and figure out how to implement it into my sme machine....

... may go to lunch 1st though!!  ;)

-=- jd -=-

s lord

Re: Directory Browsing (HTTP)
« Reply #5 on: October 15, 2003, 07:33:38 PM »
Jim
I would be interested in exactly how you achive this!  
Ive followed quite a few of Dan's HOWTO's and Im slowly getting the hang of the custom templates!!!  

However, I try and follow others so as not to break anything.  

If you post (when it works) Ill follow it through and gain a bit more confidence.  :D

Jimbo

Re: Directory Browsing (HTTP)
« Reply #6 on: October 16, 2003, 12:39:38 AM »
I am running 5.6u5 and have installed the modindex contrib (no other mods) and can just access any folder in an ibay via the path.

Just a folder in Primary ibay:
http://pybe.demon.co.uk/downloads/

Folder in ibay update:
http://pybe.demon.co.uk/update/downloads

I am installing 6.0beta3 in the next few days to have a play will see if I have any problems...

HTH
Jimbo

Jim Danvers

Re: Directory Browsing (HTTP)
« Reply #7 on: October 16, 2003, 02:04:37 AM »
s lord (and anyone else interested)....

Basically since I had positive luck with the static change that I made to the running http.conf file, AND I figured that the custom template snippett in question was the file called '90e-smithAccess40ibays'....   I just left that file in the custom templates location and then changed it to match the way that I did the static file (the one that sme will build @boot up).  So far, so good!!  I have re-booted the machine a couple of times to test this and it seems to come back up everytime just the way that I would like it to....  ;)

For what its worth, I have pasted in the line that I changed to get it to fly.  It is the one with the '+FollowSymlinks' statement.

if ($dynamicContent eq 'enabled')
        {
            $OUT .= "    Options +FollowSymlinks +Includes\n";


I don't know if this is neccessarily right, don't know that others would (or should) do this on machines that are directly exposed to the internet (this one isn't) but it works for me in this particular environment!  Good enough!!  ;)

-=- jd -=-

Dan Brown

Re: Directory Browsing (HTTP)
« Reply #8 on: October 16, 2003, 02:51:12 AM »
SME does _not_ rebuild any templated files at boot time, only when the configuration is changed.