Koozali.org: home of the SME Server

Modifing httpd template

Terry Brummell

Modifing httpd template
« on: December 08, 2002, 05:32:11 AM »
Ok, I know what I need to do, but can't figure out which template to modify.  I have installed gallery in an IBay, when running the config it says I need to change my httpd.conf file.  I know where the templates are but cannot determine how to modify them for this one Ibay.  This is what I need the custom template to have when complete:

#------------------------------------------------------------
# gallery ibay directories (Brummell Picture Gallery)
#------------------------------------------------------------


    Options Indexes
    Options +Includes
    AllowOverride Options FileInfo
    order deny,allow
    deny from all
    allow from all


the default httpd.conf file has it as:

#------------------------------------------------------------
# gallery ibay directories (Brummell Picture Gallery)
#------------------------------------------------------------


    Options Indexes
    Options +Includes
    AllowOverride none
    order deny,allow
    deny from all
    allow from all


Can anyone give me some detailed instructions on which httpd.conf template to modify so only this Ibay is changed?

I can modify the httpd.conf file directly and gallery does work, so I know this is the change I need.  I just need this to stick once and for all...

Jon Blakely

Re: Modifing httpd template
« Reply #1 on: December 08, 2002, 12:56:41 PM »
Of course the easier way would have been to install Gallery in say /opt/gallery
and then you can create a custom template fragment in

/etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/90gallery

#-------------------------------------------
#   Gallery 1.3.1
#-------------------------------------------

  Alias       /gallery         /opt/gallery


    AddType application/x-httpd-php .php .php3 .phtml
    Options Indexes +Includes FollowSymLinks
    AllowOverride Options FileInfo
    order deny,allow
    deny from all
    allow from all


#------------------------------------------


Jon

Terry Brummell

Re: Modifing httpd template
« Reply #2 on: December 08, 2002, 06:24:24 PM »
Thanks for the input, but if I wanted it installed in /opt/gallery I would just use Dan's HowTo.  I'm putting it in Ibays so 1. can have multiple galleries with different admins and 2. so I can use virtual domains to point to them.
I'm still no closer to getting this template modified.  Anybody have any idea's?

Terry

Terry Brummell

Re: Modifing httpd template
« Reply #3 on: December 08, 2002, 06:46:20 PM »
Ok, lets take this from a different angle, I modified 90e-smithAccess40ibays and changed this:

            $OUT .= "#------------------------------------------------------------\n";
            $OUT .= "# $key ibay directories ($properties{'Name'})\n";
            $OUT .= "#------------------------------------------------------------\n";

            $OUT .= "\n";
            $OUT .= "\n";
            $OUT .= "    Options Indexes\n";
            if ($dynamicContent eq 'enabled')
            {
                $OUT .= "    Options +Includes\n";
            }
            else
            {
                $OUT .= "    \n";
                $OUT .= "        order deny,allow\n";
                $OUT .= "        Deny from all\n";
                $OUT .= "    
\n";
                $OUT .= "    Options +IncludesNOEXEC\n";
            }
            $OUT .= "    AllowOverride Options FileInfo\n";
            $OUT .= "    order deny,allow\n";
            $OUT .= "    deny from all\n";
            $OUT .= "    allow from $allow\n";
            if ($pass)

I changed the $OUT .= "    AllowOverride Options FileInfo\n"; line and expanded and restarted httpd.  It now applies the changes to the IBays and gallery is working just fine.
Now, my question is:  What exactly does "AllowOverride Options FileInfo" mean?
  I've googled but was unable to find an answer.

Terry

Jon Blakely

Re: Modifing httpd template
« Reply #4 on: December 09, 2002, 12:21:38 AM »
Sorry Terry, it was a bit tongue in cheek.

FileInfo is a wrapper for AddType, AddEncoding, AddLanguage

check out

http://linuxselfhelp.com/apache/manual/mod/mod_mime.html

to find out what these are.

You may want to look at say naming all the ibays with gallery in it as

gallery1, gallery2 etc

then you could modify 90e-smithAccess40ibays

and add another 'if' statement

if ($properties {'Name'} eq 'gallery*')
$OUT .= " AllowOverride Options FileInfo\n";
else
$OUT .= " AllowOverride Options None\n";

It will probably need a bit of playing to get it right.
Put it templates-custom so that httpd.conf remains original if you stuff it up.

Jon

excalibur

Modifing httpd template
« Reply #5 on: July 08, 2004, 11:31:55 AM »
Hi Terry,

I don't have this 90e-smithAccess40ibays file on my system. Where would I implement these changes?

To enable multiple galleries on my SME 5.6 I used this file /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/93gallery

With this content:
#--------------------
#Gallery 1.3.1 Heptados
#--------------------

Alias /heptadospics     /home/e-smith/files/ibays/heptadosi/html/gallery

<Directory /home/e-smith/files/ibays/heptadosi/html/gallery>
    AddType application/x-httpd-php .php .php3 .phtml
    Options Indexes +Includes FollowSymLinks
    AllowOverride Options Fileinfo
    order deny,allow
    deny from all
    allow from all
</Directory>

#--------------------

#--------------------
#Gallery 1.3.1 Gekados
#--------------------

Alias /gekadospics      /home/e-smith/files/ibays/gekadosweb/html/gallery

<Directory /home/e-smith/files/ibays/gekadosweb/html/gallery>
    AddType application/x-httpd-php .php .php3 .phtml
    Options Indexes +Includes FollowSymLinks
    AllowOverride Options Fileinfo
    order deny,allow
    deny from all
    allow from all
</Directory>

#--------------------

as in Dan Browns how-to, but added multiple instanses of Gallery. It has been working fine until I moved to SME 6.0 and Gallery from 1.3.1 to 1.4.3.

Where may I find the holy grail that will make it work again on SME 6.0?

Any ideas?

Morten

excalibur

Older Gallery is working fine on above system
« Reply #6 on: July 08, 2004, 11:58:14 AM »
Hi,

Just wanted to add that I have older Galleries that work perfectly on this SME 6.0.

HHMMMM

Morten

excalibur

Cannot build custom segment for webserver (httpd.conf)
« Reply #7 on: July 08, 2004, 01:22:55 PM »
Hi again,

Am now trying to create new Gallery on my old Gallery 1.3.3 platform that work.

But when editing the 83gallery segment of httpd.conf and rebuilkding and restarting webserver - it comes up with directive error.

[root@indsigt1 gallery]# /etc/rc.d/rc7.d/S85httpd-e-smith restart               Shutting down http:                                        [ FAILED ]
Starting httpd: Syntax error on line 3252 of /etc/httpd/conf/httpd.conf:
<Directory> directive missing closing '>'
                                                           [ FAILED ]

This is line 3252 from /etc/httpd/conf/httpd.conf
********
<Directory /home/e-smith/files/primary/html/gallery
*****

The file builds nicely if I rem out the lines for Primary Gallery below:

#--------------------
#Gallery 1.3.1 Primary (Morten's)
#--------------------

Alias /gallery       /home/e-smith/files/primary/html/gallery

<Directory /home/e-smith/files/primary/html/gallery

    AddType application/x-httpd-php .php .php3 .phtml
    Options Indexes +Includes FollowSymLinks
    AllowOverride Options Fileinfo
    order deny,allow
    deny from all
    allow from all
</Directory>

#--------------------

I know that SME 6.0 started using symlink to files/primary = files/ibays/Primary. But I have tried to use both. With no success.

Hmmm what seems to be the matter here!!! ?

Anyone up for cracking this nut.

Morten

thowden

Modifing httpd template
« Reply #8 on: July 24, 2004, 12:45:32 AM »
Hi Morten

That directory directive problem will be a coding error in the template file.
Quote
[root@indsigt1 gallery]# /etc/rc.d/rc7.d/S85httpd-e-smith restart Shutting down http: [ FAILED ]
Starting httpd: Syntax error on line 3252 of /etc/httpd/conf/httpd.conf:
<Directory> directive missing closing '>'
[ FAILED ]

This is line 3252 from /etc/httpd/conf/httpd.conf
********
<Directory /home/e-smith/files/primary/html/gallery
*****


You'll need to check the template that you modified for the gallery entries. Somewhere near the end of the line that starts with '<Directory ' you need to add in the closing '>' symbol.