Koozali.org: home of the SME Server

Putting apps in the /opt directory

Craig Bursey

Putting apps in the /opt directory
« on: May 06, 2003, 09:07:56 PM »
Hi Folks,

Wondering why some apps I put in the /opt directory work and others don't?  I have phpBB2, Gallery, ServerStatus, phpmyadmin all in the /opt directory  and they are working fine.  But when I try to load some other apps in the /opt directory, they don't work.  What could I be forgetting to do??  Some of the apps I've tried to load and failed are  phpsimplefaq and PHP Poll Wizard.  

I'm thinking maybe it's a rights issue and I'm forgetting to do a CHMOD or somthing...

Thanks,

Craig

Terry Brummell

Re: Putting apps in the /opt directory
« Reply #1 on: May 06, 2003, 09:24:51 PM »
Are you modifying the httpd templates properly?  The phpBB2 and Gallery rpm's add a few template fragments to modify the apache config file.

HTH, Terry

Craig Bursey

Re: Putting apps in the /opt directory
« Reply #2 on: May 06, 2003, 10:28:45 PM »
Terry,

I haven't tried anything to do with the httpd templates, I'm unfamiliar with is...........so I guess I'll have to do some reading.    

Thanks

Craig

Bill Talcott

Re: Putting apps in the /opt directory
« Reply #3 on: May 06, 2003, 11:39:04 PM »
/opt is just another directory, nothing special. You need to modify the apache config files like Terry said to make aliases to access the stuff you put in /opt.

Craig Jensen

Re: Putting apps in the /opt directory
« Reply #4 on: May 07, 2003, 07:47:02 AM »
Craig,

Read the documentation here:
http://www.e-smith.org/custom
under 'Custom template Modifications'.  Below is an example 'template' I have called 99xdb-money and placed in /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf

#---------------------------------------------
#  xdb-money alias/config
#---------------------------------------------

Alias /money /opt/money


        Options -Indexes
    AllowOverride None
    order allow,deny
    allow from all
    AddType application/x-httpd-php .php


#--------------------------------------------
#  EOF
#--------------------------------------------

This template will alias the /opt/money dir to /money (webroot/money) allowing for web access to that directory i.e. www.yourdomain.com/money

As it states in the documentation, once a template is created you must issue the command /sbin/e-smith/expand-template /path/to/templated/file.  For the above template that would be:
/sbin/e-smith/expand-template  /etc/httpd/conf/httpd.conf

This 'expands' the template, applying the contents of your template fragment to the file you are editing/templating.

Read through the docs on this and you will begin to understand the templating system.

Craig Jensen

Craig Bursey

Re: Putting apps in the /opt directory
« Reply #5 on: May 07, 2003, 04:55:39 PM »
Thanks Craig,

I was about you ask for some direction on where to look for some template instructions and you came through.

Thanks one and all for your help.  As always, I appreciate the help.

Craig