Koozali.org formerly Contribs.org

Manage domains

Re: Manage domains
« Reply #15 on: February 27, 2008, 03:48:10 AM »
I still feel that the original question hasn't been answered fully, however this is my understanding:

If you have a contrib created by someone, that developer is responsible for creating the Webtemplate related to that app.
If you are install an application yourself, put it in an iBay and thus you can then use the inbuilt Domain Manager.

Please correct me if my assumptions are wrong also there is still no clarification as to why to use the /opt folder over and above an iBay, this just adds confusion.

As to Ray suggesting that electoman00 create a NFR, well that was done http://bugs.contribs.org/show_bug.cgi?id=2460 and it was simply closed saying to use Webserver_templates.
« Last Edit: February 27, 2008, 03:51:15 AM by girkers »

Offline raem

  • *
  • 3,972
Re: Manage domains
« Reply #16 on: February 27, 2008, 05:52:46 AM »
girkers

Quote
I still feel that the original question hasn't been answered fully....

The original question put by steve1084 was:
Quote
Question.  Is there a particular reason why this functionality was never included and is there anyone working towards including this functionality in the domain manager.

I think the following answers that adequately.

Well it does not appear that anyone (ie currently active developers) want to create code/server manager panel for domain management in /opt, most probably as they don't feel it is a high priority issue.

As I understand it, a suitable workaround has been suggested ie that you create/modify a template to point the domain at /opt

Therefore unless someone else creates well developed code to do this function by alternative means, then it's not likely to happen any other way.

Alternative suggestions have been provided in this thread and others.


Quote
...there is still no clarification as to why to use the /opt folder over and above an iBay...

Search the forums, bug tracker and devinfo list for the answers to this, which are scattered about the place.


Quote
As to Ray suggesting that electoman00 create a NFR...

It wasn't just a suggestion to raise a bug per se, but a suggestion to add his rational end user/technical justification for the new feature, so the developers could assess the request on technical merit. The main developers are not really interested in generating new code without sufficient justification. They have too many new feature requests to be able to action all of them

« Last Edit: February 28, 2008, 06:12:25 AM by RayMitchell »
...

Re: Manage domains
« Reply #17 on: February 27, 2008, 07:28:50 PM »
Well all I can say is WOW!

Re: Manage domains
« Reply #18 on: February 28, 2008, 03:49:46 AM »
Just to set the record straight here.

Neither gerkers or electroman were asking for a (new feature request) NFR.

Neither gerkers or electroman were asking for any code to be developed by anyone including any dev team members.

Neither gerkers or electroman were asking for workaround for anything.


Quote
It must be something magical because no one has explained it's purpose, concept, rational sufficiently so all will understand completely!

Statement with the implied meaning.


It must be something magical because no one has explained /opt it's purpose, concept, rational sufficiently so all will understand completely!

I still feel that the original question hasn't been answered fully,

Please correct me if my assumptions are wrong also there is still no clarification as to why to use the /opt folder over and above an iBay, this just adds confusion.

Two posts with the same exact agenda, RFC Request For Clarification and in this instance, qualified /opt

Explain /opt it's purpose, concept, rational sufficiently so all will understand completely!

Then the Fat Lady can sing......


Offline raem

  • *
  • 3,972
Re: Manage domains
« Reply #19 on: February 28, 2008, 04:21:08 AM »
electroman00

You demand answers, but from who ?
No one is obliged or paid to answer your questions.
If the answer is not quite what you want/expected or if you are advised to search then do so and be thankful you got an answer at all.

This is a self help community so search for the answers re /opt as already advised.

PS. Please remove your bonnet and let the bee out, the stings are obviously hurting.
...

Offline pfloor

  • ****
  • 888
Re: Manage domains
« Reply #20 on: February 28, 2008, 07:21:44 AM »
My 2 cents worth on this:

What seems to confuse folks (including me) is that constant comments like:

Quote
I'm aware of developer recommendation not to install web apps in ibays...
AND
Do not install applications in ibays, that seems the easiest solution but is not the safest or optimal way to configure your application. Install them in the /opt or the /var/www directory instead and create the necessary template files for the httpd.conf file.

There are comments similar to this scatterred throughout the forums and most of them are reasoned by saying "because it's the safe way" and/or "because the developer say so".  No real concrete, to the point explanation, just "because it's the safe way" and/or "because the developers say so"

But then Charlie states what appears to be the opposite:

That functionality was never included because there's no reason for it, unless you consider /opt to be something magical. As others have said, i-bays are provided for you to add web content to, and the domains panel allows you to connect particular i-bays to particular domains...

"unless you consider /opt to be something magical"??? Not really magical, more like mystical.  Folks have been telling us that the developers (that would be you Charlie) have informed us to put our web apps in the /opt directory for some "mystical" reason with no real reason as to why except the occasional "because the developers say so".  The forums are littered with comments like this and now you seem to contradict what others have said that you say (I guess that would be considered heresay).

This is the real confusion/mystery about the /opt directory (no magic involved).

I personally have never seen a real concrete reasons as to why to place web apps in the /opt directory (and not in an i-bay) and have always put my web apps in i-bays.

IMHO Using the /opt directory is nothing more than a pure pain in my rear!

« Last Edit: February 28, 2008, 07:24:41 AM by pfloor »
In life, you must either "Push, Pull or Get out of the way!"

Offline william_syd

  • ****
  • 1,608
  • Nothing to see here.
    • http://www.magicwilly.info
Re: Manage domains
« Reply #21 on: February 28, 2008, 07:33:13 AM »


Is "web content" the same as "web applications"?

There was some talk about this in the developer discussion list.

My understanding is ibays are bad (for reasons still to be defined in simple terms but may have something to do with .htaccess and bad php code) and /opt has become the "defacto" location for web apps. /opt could be replaced by /usr/share/webapps or similar, as long as it's not an iBay.


Regards,
William

IF I give advise.. It's only if it was me....

Offline pfloor

  • ****
  • 888
Re: Manage domains
« Reply #22 on: February 28, 2008, 07:37:41 AM »

Is "web content" the same as "web applications"?

And yet more confusion :-)

Quote
My understanding is ibays are bad (for reasons still to be defined in simple terms ...

Exactly, "still to be defined"!
In life, you must either "Push, Pull or Get out of the way!"

Offline raem

  • *
  • 3,972
Re: Manage domains
« Reply #23 on: February 28, 2008, 09:53:40 AM »
Took me a little while to find, but here's where it started.
Note that anyone could have found this if they bothered to take the time to search, which I did !

With links and content quoted.

http://lists.contribs.org/pipermail/devinfo/2006-December/009462.html

On Wed, 20 Dec 2006, Greg J. Zartman, P.E. wrote:

> I'll put together a regular install howto soon, but here's a basic one:
>
> 1. Create a new dbase for the addressbook.
>
> 2. Create an ibay called addressbook.
...

Please don't reinforce the design pattern of using ibays for web
applications.  Create a small httpd.conf template fragment to enable web
access only to the files which need to be accessed via http. See webmail
as an example.

Charlie


http://lists.contribs.org/pipermail/devinfo/2006-December/009464.html

> Please don't reinforce the design pattern of using ibays for web
> applications. 

I prefer this method of deploying apps of this type on my setup as it
doesn't require me to hack config files, only later to forget what I
did.  If I get tired of the app, I just delete the ibay and it's gone.

However, your comment begs the question of why the ibay config panel
includes this:

Execution of dynamic content (CGI, PHP, SSI)

Greg



http://lists.contribs.org/pipermail/devinfo/2006-December/009465.html

> However, your comment begs the question of why the ibay config panel
> includes this:
>
> Execution of dynamic content (CGI, PHP, SSI)

Well, it *raises* the question, anyway.

I remember a great deal of discussion at Mitel about this issue. I did a
fair amount of research into secure methods of allowing non-root users
and groups to run executable content in ibays, and ultimately we decided
that there was no safe way to do so without making things dangerously
complex and raising the resource requirements beyond a level that we
were comfortable with.

Our compromise decision was to turn off the ability to run
PHP/Perl/Whatever on the webserver without the express permission from
the admin user. Hence the flag above. It's an imperfect solution.

The problem is an obvious one: Making it too easy to install a (possibly
poorly-written) CMS-du-jour can compromise the security of the entire
system. Encouraging people to install new applications (even web apps)
using a consistent and proven process encourages better - and safer -
integration.

I'm not assuming this was Charlie's rationale, but it sounds like reason
enough to me.

Dan McGarry   

« Last Edit: February 28, 2008, 10:00:08 AM by RayMitchell »
...

Re: Manage domains
« Reply #24 on: February 28, 2008, 10:01:10 AM »
Quote
Not really magical, more like mystical.

There ya have it...... /opt the magical mystery tour.

Has a nice ring to it.


Quote
Is "web content" the same as "web applications"?

web applications are applications that are accessed via Web through a network.

Some may be confused or consider it improper to define web applications as

web applications are applications that are accessed via the Web through a network.

"via the Web" has certain implications.

web content  is content the user experiences

Offline raem

  • *
  • 3,972
Re: Manage domains
« Reply #25 on: February 28, 2008, 10:13:51 AM »
In case readers skip/gloss over the pertinent part of what Charlie said, I quote it again.

"Create a small httpd.conf template fragment to enable web
access only to the files which need to be accessed via http. See webmail
as an example."

Of course that still needs someone to investigate and create an easy to read foolproof howto, which then leads us to
http://wiki.contribs.org/Web_Application_RPM

If you read that VERY carefully you may well find the answers.
See
http://wiki.contribs.org/Web_Application_RPM#Webserver_templates
and
http://wiki.contribs.org/Web_Application_RPM#New_DB_settings

which in part says (and implies can be done with the correct template fragments in place):

To add a different URL eg. yourserver.net/foo

note, this adds another url, it doesn't remove the default

config setprop foo URL newfoo


To run foo from the root of a domain eg.

foo.yourserver.net or
domain2.org

config setprop foo domain foo.yourserver.org OR
config setprop foo domain domain2.org


Can the Fat Lady Sing yet, I don't know as I have not tried it out.
...

Offline raem

  • *
  • 3,972
Re: Manage domains
« Reply #26 on: February 29, 2008, 08:50:47 AM »
....and the Fat Lady Sings....

You want to have a web application in /opt
You want to have a virtual domain(s) on your sme server
You want to access the web app in /opt/appname using the virtual domain ie www.myvirtualdomain.com

Following on from the above thread and utilising the information in
http://wiki.contribs.org/Web_Application_RPM
here's what I did as a test example

Install Joomla using
http://wiki.contribs.org/Joomla
This installs the Joomla CMS application in /opt/joomla
It also installs a fragment /etc/e-smith/templates/etc/httpd/conf/httpd.conf/92joomla

Create another fragment
pico -w /etc/e-smith/templates/etc/httpd/conf/httpd.conf/80OptDomainJoomla

Enter the following code which is taken from http://wiki.contribs.org/Web_Application_RPM - Webserver Templates - a workaround to enable the application to be located in a domain or subdomain root, having replaced foo with joomla, and save the file

Code: [Select]
{
   my $status = $joomla{'status'} || "disabled";
   return "    # joomla-status is disabled.\n"
           unless $status eq 'enabled';

   my $domain = $joomla{'domain'} || "disabled";
   return "    # no hostname or domain for joomla defined\n"
           if $domain eq 'disabled';

   my $DocRoot = "/opt/joomla";

   $OUT  = "";
   $OUT .= "\n";
   $OUT .= "# Redirect an existing hostname or domain to $DocRoot.\n";
   $OUT .= "<VirtualHost 0.0.0.0:80>\n";
   $OUT .= "    ServerName  $domain\n";
   $OUT .= "    DocumentRoot $DocRoot\n";
   $OUT .= "</VirtualHost>\n";
   $OUT .= "<VirtualHost 0.0.0.0:443>\n";
   $OUT .= "    ServerName  $domain\n";
   $OUT .= "    DocumentRoot  $DocRoot\n";
   $OUT .= "    SSLEngine on\n";
   $OUT .= "</VirtualHost>\n";
}


Then use the db command to run joomla from the root of a virtual domain ie www.myvirtualdomain.com
The virtual domain must exist in the Domains panel and be correctly configured in external DNS.
You will also need to set the status to enabled as the code reads this db property (even though the default status is enabled it needs to be set).

Code: [Select]
config setprop joomla status enabled
config setprop joomla domain www.myvirtualdomain.com
expand-template /etc/httpd/conf/httpd.conf
sv h /service/httpd-e-smith


Then open your browser and type in the URL
http://www.myvirtualdomain.com

The Joomla CMS should open and the browser will display the same URL

Remember to Refresh your browser cache to clear old cached data.


As indicated in http://wiki.contribs.org/Web_Application_RPM you can also use a URL in the form
mymaindomain.com/cms
or
myvirtualdomain.com/cms
Remove any previous domain entry first

Code: [Select]
config setprop joomla status enabled
config delprop joomla domain
config setprop joomla URL cms
expand-template /etc/httpd/conf/httpd.conf
sv h /service/httpd-e-smith


Apply the above concepts to any other application installed in /opt/appname, keeping in mind the template fragments should conform to the code shown in the examples posted in http://wiki.contribs.org/Web_Application_RPM
and should be renamed appropriately eg
92webappname
and
80OptDomainWebappname
The fragments should also be edited to suit the webappname


I think that answers the original posters question, if it doesn't then it's the best answer you are going to get for now !
« Last Edit: February 29, 2008, 08:58:08 AM by RayMitchell »
...

Offline raem

  • *
  • 3,972
Re: Manage domains
« Reply #27 on: February 29, 2008, 09:41:08 AM »
« Last Edit: March 02, 2008, 12:25:06 AM by RayMitchell »
...

Re: Manage domains
« Reply #28 on: February 29, 2008, 11:51:46 AM »

Just to jump in here, is this a summary of what has gone before?

You can use iBays for web applications such as Joomla or eGroupWare, but it is not really recommended. This is because system users can see or access these iBays which is not good. The alternative is to install these apps in the /opt directory where they are nicely hidden away, but this involves a certain amount of jiggery pokery if you want to use virtual domains set up in the server manager.

Sorry if I'm being a bit thick :-)
Jim

Offline raem

  • *
  • 3,972
Re: Manage domains
« Reply #29 on: February 29, 2008, 01:33:50 PM »
Peasant

Quote
...install these apps in the /opt directory ..... but this involves a certain amount of jiggery pokery if you want to use virtual domains set up in the server manager.

The wiki article explains by example how to do the "jiggery pokery", which is what a lot of people have been wanting to know.
...