Koozali.org: home of the SME Server

[NEW HOWTO] h5ai light weight directory indexer

Offline brianr

  • *
  • 991
  • +2/-0
Re: [NEW HOWTO] h5ai light weight directory indexer
« Reply #30 on: June 30, 2015, 01:37:44 PM »
When I surf to "files.domain.com" it goes to the primary i-bay index.html
Brian j Read
(retired, for a second time, still got 2 installations though)
The instrument I am playing is my favourite Melodeon.
.........

guest22

Re: [NEW HOWTO] h5ai light weight directory indexer
« Reply #31 on: June 30, 2015, 02:11:31 PM »
Is the virtual host files.domain.com present in httpd.conf?

Offline brianr

  • *
  • 991
  • +2/-0
Re: [NEW HOWTO] h5ai light weight directory indexer
« Reply #32 on: June 30, 2015, 03:51:04 PM »
Is the virtual host files.domain.com present in httpd.conf?

is that /etc/httpd/conf/httpd.conf?

Code: [Select]
cat /etc/httpd/conf/httpd.conf | grep "files\.bjsystems"

Gives me nothing. :-(

Code: [Select]
[root@bjsserver etc]# db domains show
......
files.bjsystems.co.uk=domain
    Content=depot
    Description=files for web access
    DirectoryIndex=/_h5ai/server/php/index.ph
    DocumentRoot=/home/e-smith/files/ibays/depot/html
    Nameservers=internet
    TemplatePath=WebAppVirtualHost
.....

(given up bothering about domain id!)
Brian j Read
(retired, for a second time, still got 2 installations though)
The instrument I am playing is my favourite Melodeon.
.........

guest22

Re: [NEW HOWTO] h5ai light weight directory indexer
« Reply #33 on: June 30, 2015, 04:26:25 PM »
I don't undestand what is wrong. While assisting I did 4 new installs on 4 new VM's. They all work.

Offline brianr

  • *
  • 991
  • +2/-0
Re: [NEW HOWTO] h5ai light weight directory indexer
« Reply #34 on: June 30, 2015, 04:28:16 PM »
I don't undestand what is wrong. While assisting I did 4 new installs on 4 new VM's. They all work.

I presume that the problem is that it is not in the /etc/httpd/conf/httpd.conf?

What puts it there?
Brian j Read
(retired, for a second time, still got 2 installations though)
The instrument I am playing is my favourite Melodeon.
.........

guest22

Re: [NEW HOWTO] h5ai light weight directory indexer
« Reply #35 on: June 30, 2015, 04:31:30 PM »
The custom template fragment is playing part here. Please frmat it with your editor by really removing al LF or other charachters. Normally you would stand on line 2 and backspace to the end of line 1. The hit enter to force a CR. That way all other stuff is gone and have a clean file. This must be doen for _each_ line.


The fragment is now not parsed correctly, so template creation is aborted, and thus no virtual host.

Offline brianr

  • *
  • 991
  • +2/-0
Re: [NEW HOWTO] h5ai light weight directory indexer
« Reply #36 on: June 30, 2015, 04:32:31 PM »
aha - found an error message in the /var/log/messages:

Code: [Select]
Jun 30 12:20:28 bjsserver esmith::event[5177]: ERROR in /etc/e-smith/templates-custom//etc/httpd/conf/httpd.conf/WebAppVirtualHost/60DirectoryIndex: Program fragment delivered error <<syntax error at /etc/e-smith/templates-custom//etc/httpd/conf/httpd.conf/WebAppVirtualHost/60DirectoryIndex line 2, at EOF 
Jun 30 12:20:28 bjsserver esmith::event[5177]: syntax error at /etc/e-smith/templates-custom//etc/httpd/conf/httpd.conf/WebAppVirtualHost/60DirectoryIndex line 3, near "ne )">> at template line 1 
Jun 30 12:20:28 bjsserver esmith::event[5177]: WARNING in /etc/e-smith/templates//etc/httpd/conf/httpd.conf/80VirtualHosts: ERROR: Template processing failed for //etc/httpd/conf/httpd.conf/WebAppVirtualHost: 1 fragment generated errors 

Looks like the fragment is wrong.

Brian j Read
(retired, for a second time, still got 2 installations though)
The instrument I am playing is my favourite Melodeon.
.........

Offline brianr

  • *
  • 991
  • +2/-0
Re: [NEW HOWTO] h5ai light weight directory indexer
« Reply #37 on: June 30, 2015, 04:33:37 PM »
This is the fragment as I have just copied out of the wiki.

what has happened to the if expression?

Code: [Select]
{
my $dindex = $domain->prop('DirectoryIndex') || ;
if ($dindex ne ){
   $OUT .= "    DirectoryIndex $dindex\n";
}
}
Brian j Read
(retired, for a second time, still got 2 installations though)
The instrument I am playing is my favourite Melodeon.
.........

guest22

Re: [NEW HOWTO] h5ai light weight directory indexer
« Reply #38 on: June 30, 2015, 04:34:11 PM »
That's what I thought, based on cut and paste from the wiki.

Offline brianr

  • *
  • 991
  • +2/-0
Re: [NEW HOWTO] h5ai light weight directory indexer
« Reply #39 on: June 30, 2015, 04:40:38 PM »
That's what I thought, based on cut and paste from the wiki.

What should the if expression be?

I'm guessing ($dindex ne "")

and how do I expand it?
« Last Edit: June 30, 2015, 04:44:17 PM by brianr »
Brian j Read
(retired, for a second time, still got 2 installations though)
The instrument I am playing is my favourite Melodeon.
.........

guest22

Re: [NEW HOWTO] h5ai light weight directory indexer
« Reply #40 on: June 30, 2015, 04:42:41 PM »
What should the if expression be?

I'm guessing ($dindex ne "")


adapted wiki page (wiki parsing is playing us part). Indeed, but single quotes is sufficient.

Offline brianr

  • *
  • 991
  • +2/-0
Re: [NEW HOWTO] h5ai light weight directory indexer
« Reply #41 on: June 30, 2015, 04:52:01 PM »

adapted wiki page (wiki parsing is playing us part). Indeed, but single quotes is sufficient.

ok, I got the index pafge now - I had to edit back in the empty string in two places, then expand the template and restart http-e-smith.

Ok, next is to load up some files!!  (tomrrow)
Brian j Read
(retired, for a second time, still got 2 installations though)
The instrument I am playing is my favourite Melodeon.
.........

guest22

Re: [NEW HOWTO] h5ai light weight directory indexer
« Reply #42 on: June 30, 2015, 11:20:49 PM »
Wiki page revised. Daniel was kind enough to include the custom template fragment into smeserver-webapps-common. Should make it all a bit easier.


If you had created the custom-template fragment (60DirectoryIdex) previously, please remove it completely and update to the latest smeserver-webapps-common from the fws repo followed by a signal-event webapps-update.

Offline brianr

  • *
  • 991
  • +2/-0
Re: [NEW HOWTO] h5ai light weight directory indexer
« Reply #43 on: July 01, 2015, 11:29:00 AM »
ok, finally got it going.  Looks good!!

PS Can't find a delete - is there one?

PPS Many thanks for the contrib and the help.
Brian j Read
(retired, for a second time, still got 2 installations though)
The instrument I am playing is my favourite Melodeon.
.........

Offline brianr

  • *
  • 991
  • +2/-0
Re: [NEW HOWTO] h5ai light weight directory indexer
« Reply #44 on: July 01, 2015, 11:37:56 AM »
Here I am again!

I get dependency failure from trying to install ffmpeg.

Code: [Select]
[root@bjsserver files]# yum install ffmpeg --enablerepo=atrpms
Loaded plugins: fastestmirror, protect-packages, smeserver
Loading mirror speeds from cached hostfile
 * base: mirrors.melbourne.co.uk
 * smeaddons: www.mirrorservice.org
 * smeextras: www.mirrorservice.org
 * smeos: www.mirrorservice.org
 * smeupdates: www.mirrorservice.org
 * updates: centos.hyve.com
atrpms                                                                        | 2.6 kB     00:00     
atrpms/primary_db                                                             | 2.3 MB     00:03     
Excluding Packages from atrpms - EL5
Finished
Excluding Packages from CentOS - os
Finished
Excluding Packages from CentOS - updates
Finished
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package ffmpeg.i386 0:2.2.1-65.el5 set to be updated
--> Processing Dependency: libavcodec55 = 2.2.1-65.el5 for package: ffmpeg
--> Processing Dependency: libswresample0 = 2.2.1-65.el5 for package: ffmpeg
--> Processing Dependency: libavdevice55 = 2.2.1-65.el5 for package: ffmpeg
--> Processing Dependency: libavutil52 = 2.2.1-65.el5 for package: ffmpeg
--> Processing Dependency: libavfilter4 = 2.2.1-65.el5 for package: ffmpeg
--> Processing Dependency: libswscale2 = 2.2.1-65.el5 for package: ffmpeg
--> Processing Dependency: libavformat55 = 2.2.1-65.el5 for package: ffmpeg
--> Processing Dependency: libpostproc52 = 2.2.1-65.el5 for package: ffmpeg
--> Processing Dependency: libpostproc.so.52 for package: ffmpeg
--> Processing Dependency: libavdevice.so.55(LIBAVDEVICE_55) for package: ffmpeg
--> Processing Dependency: libavcodec.so.55(LIBAVCODEC_55) for package: ffmpeg
--> Processing Dependency: libavdevice.so.55 for package: ffmpeg
--> Processing Dependency: libavutil.so.52(LIBAVUTIL_52) for package: ffmpeg
--> Processing Dependency: libpostproc.so.52(LIBPOSTPROC_52) for package: ffmpeg
--> Processing Dependency: libswscale.so.2(LIBSWSCALE_2) for package: ffmpeg
--> Processing Dependency: libavformat.so.55(LIBAVFORMAT_55) for package: ffmpeg
--> Processing Dependency: libavutil.so.52 for package: ffmpeg
--> Processing Dependency: libavfilter.so.4 for package: ffmpeg
--> Processing Dependency: libswresample.so.0 for package: ffmpeg
--> Processing Dependency: libswscale.so.2 for package: ffmpeg
--> Processing Dependency: libavformat.so.55 for package: ffmpeg
--> Processing Dependency: libSDL-1.2.so.0 for package: ffmpeg
--> Processing Dependency: libswresample.so.0(LIBSWRESAMPLE_0) for package: ffmpeg
--> Processing Dependency: libavfilter.so.4(LIBAVFILTER_4) for package: ffmpeg
--> Processing Dependency: libvdpau.so.1 for package: ffmpeg
--> Processing Dependency: libavcodec.so.55 for package: ffmpeg
--> Running transaction check
---> Package SDL.i386 0:1.2.10-9.el5 set to be updated
---> Package libavcodec55.i386 0:2.2.1-65.el5 set to be updated
--> Processing Dependency: libxavs.so.1 for package: libavcodec55
--> Processing Dependency: libopencore-amrwb.so.0 for package: libavcodec55
--> Processing Dependency: libx264.so.142 for package: libavcodec55
--> Processing Dependency: libva-0.32.0.2.so.1 for package: libavcodec55
--> Processing Dependency: libxvidcore.so.4 for package: libavcodec55
--> Processing Dependency: libvorbisenc.so.2 for package: libavcodec55
--> Processing Dependency: libtheoradec.so.1 for package: libavcodec55
--> Processing Dependency: libmp3lame.so.0 for package: libavcodec55
--> Processing Dependency: libtheoraenc.so.1(libtheoraenc_1.0) for package: libavcodec55
--> Processing Dependency: libtheoraenc.so.1 for package: libavcodec55
--> Processing Dependency: libopencore-amrnb.so.0 for package: libavcodec55
--> Processing Dependency: libgsm.so.1 for package: libavcodec55
--> Processing Dependency: libtheoradec.so.1(libtheoradec_1.0) for package: libavcodec55
--> Processing Dependency: libvorbis.so.0 for package: libavcodec55
---> Package libavdevice55.i386 0:2.2.1-65.el5 set to be updated
--> Processing Dependency: libdc1394.so.22 for package: libavdevice55
---> Package libavfilter4.i386 0:2.2.1-65.el5 set to be updated
---> Package libavformat55.i386 0:2.2.1-65.el5 set to be updated
--> Processing Dependency: librtmp.so.0 for package: libavformat55
---> Package libavutil52.i386 0:2.2.1-65.el5 set to be updated
---> Package libpostproc52.i386 0:2.2.1-65.el5 set to be updated
---> Package libswresample0.i386 0:2.2.1-65.el5 set to be updated
---> Package libswscale2.i386 0:2.2.1-65.el5 set to be updated
---> Package libvdpau1.i386 0:0.7-5.el5 set to be updated
--> Running transaction check
---> Package libavcodec55.i386 0:2.2.1-65.el5 set to be updated
--> Processing Dependency: libtheoradec.so.1 for package: libavcodec55
--> Processing Dependency: libtheoraenc.so.1(libtheoraenc_1.0) for package: libavcodec55
--> Processing Dependency: libtheoraenc.so.1 for package: libavcodec55
--> Processing Dependency: libtheoradec.so.1(libtheoradec_1.0) for package: libavcodec55
---> Package libdc1394_22.i386 0:2.0.2-11.el5 set to be updated
--> Processing Dependency: libraw1394.so.8 for package: libdc1394_22
---> Package libgsm1.i386 0:1.0.13-2.el5 set to be updated
---> Package libmp3lame0.i386 0:3.99.3-23.el5 set to be updated
---> Package libopencore-amrnb0.i386 0:0.1.3-1.el5 set to be updated
---> Package libopencore-amrwb0.i386 0:0.1.3-1.el5 set to be updated
---> Package librtmp0.i386 0:2.3-1.el5 set to be updated
---> Package libva-0.32.0.2_1.i386 0:0.32.0-4_sds2.el5 set to be updated
---> Package libvorbis.i386 1:1.1.2-3.el5_7.6 set to be updated
--> Processing Dependency: libogg >= 2:1.1 for package: libvorbis
--> Processing Dependency: libogg.so.0 for package: libvorbis
---> Package libx264_142.i486 0:0.142-20_20140406.2245.el5 set to be updated
---> Package libxavs1.i386 0:0.1.51-2.el5 set to be updated
---> Package libxvidcore4.i386 0:1.3.2-15.el5 set to be updated
--> Running transaction check
---> Package libavcodec55.i386 0:2.2.1-65.el5 set to be updated
--> Processing Dependency: libtheoradec.so.1 for package: libavcodec55
--> Processing Dependency: libtheoraenc.so.1(libtheoraenc_1.0) for package: libavcodec55
--> Processing Dependency: libtheoraenc.so.1 for package: libavcodec55
--> Processing Dependency: libtheoradec.so.1(libtheoradec_1.0) for package: libavcodec55
---> Package libogg.i386 2:1.1.3-3.el5 set to be updated
---> Package libraw1394.i386 0:1.3.0-1.el5 set to be updated
--> Finished Dependency Resolution
libavcodec55-2.2.1-65.el5.i386 from atrpms has depsolving problems
  --> Missing Dependency: libtheoraenc.so.1(libtheoraenc_1.0) is needed by package libavcodec55-2.2.1-65.el5.i386 (atrpms)
libavcodec55-2.2.1-65.el5.i386 from atrpms has depsolving problems
  --> Missing Dependency: libtheoraenc.so.1 is needed by package libavcodec55-2.2.1-65.el5.i386 (atrpms)
libavcodec55-2.2.1-65.el5.i386 from atrpms has depsolving problems
  --> Missing Dependency: libtheoradec.so.1(libtheoradec_1.0) is needed by package libavcodec55-2.2.1-65.el5.i386 (atrpms)
libavcodec55-2.2.1-65.el5.i386 from atrpms has depsolving problems
  --> Missing Dependency: libtheoradec.so.1 is needed by package libavcodec55-2.2.1-65.el5.i386 (atrpms)
Error: Missing Dependency: libtheoraenc.so.1 is needed by package libavcodec55-2.2.1-65.el5.i386 (atrpms)
Error: Missing Dependency: libtheoraenc.so.1(libtheoraenc_1.0) is needed by package libavcodec55-2.2.1-65.el5.i386 (atrpms)
Error: Missing Dependency: libtheoradec.so.1 is needed by package libavcodec55-2.2.1-65.el5.i386 (atrpms)
Error: Missing Dependency: libtheoradec.so.1(libtheoradec_1.0) is needed by package libavcodec55-2.2.1-65.el5.i386 (atrpms)
 You could try using --skip-broken to work around the problem
 You could try running: package-cleanup --problems
                        package-cleanup --dupes
                        rpm -Va --nofiles --nodigest
The program package-cleanup is found in the yum-utils package.

Code: [Select]
[root@bjsserver files]# db yum_repositories show atrpms
atrpms=repository
    BaseURL=http://dl.atrpms.net/el5-$basearch/atrpms/stable
    EnableGroups=no
    Exclude=clamav,spamassassin,libselinux,perl-HTML-Parser,lm_sensors,perl-IO-stringy,perl-XML-Parser,razor-agents,libgcrypt,rpm-python,libxml2,zlib,gnupg,libxml2-python,yum,module-init-tools,rpm,gettext,librpm4,glib2,perl-libwww-perl,perl-Convert-ASN1,beecrypt,fetchmail,libacl,libtool-ltdl,popt,libgpg-error,freetype,perl-MIME-tools,mutt,gd,perl-TimeDate,librpm4.4
    GPGCheck=yes
    GPGKey=http://ATrpms.net/RPM-GPG-KEY.atrpms
    Name=atrpms - EL5
    Visible=no
    status=disabled
« Last Edit: July 01, 2015, 11:40:36 AM by brianr »
Brian j Read
(retired, for a second time, still got 2 installations though)
The instrument I am playing is my favourite Melodeon.
.........