Koozali.org formerly Contribs.org

Manage domains

Manage domains
« on: October 19, 2007, 07:10:48 PM »
Manage domains

I have recently found SME Server and have found its feature set very appealing.  However the one thing that I have found most frustrating is the lack of usability in the Domain Manager.  What I expected and what I found seems strange to me given the functionality of the rest of the SME feature sets. :?

Almost everyone suggests to install websites in the /opt directory but when I go to the domain manager there is no option to choose the [example “opt/mywebsitefolder”] folder as the domains folder location and have it do for the /opt folders what it does for the primary and ibay folders, ie resolve the domain to that folder.

Because this functionality is missing there seems to be many people asking the same question over and over again about how to have a domain name resolve to the /opt/mysitefolder directory.

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.

Also I would like to make a suggestion that the domain controller be used to either accept an existing /opt installation or to create it with a tick the boxes approach to the feature set similar to ispconfig.

Currently almost everything concerning the web hosting side of sme is done by command line.

What I would love to see is a hybrid of both sme and ispconfig. Sme for all the business management, email and firewall etc needs and an ispconfig style approach to the domain management.
Mmmmmmm Now wouldn’t that just make for the most perfect server.

I must confess that my main box is currently a debian etch ispconfig server running about 12 sites.  Its been very reliable. However given all the extra features of sme and its easy to use interface I am looking to change my server over to sme as its easier to go this way than to try and install all these features and functionality onto my debian box.

And I hope ultimately easier to maintain

To everyone developing sme I give you many thanks for what is already a great product.

Thanks :-P
Steve

guest22

Re: Manage domains
« Reply #1 on: October 19, 2007, 08:55:03 PM »
Simply use I-bays for serving multiple (virtual) domains, right?

guest

Re: Manage domains
« Reply #2 on: October 19, 2007, 11:18:27 PM »
Simply use I-bays for serving multiple (virtual) domains, right?

guest

If that was an acceptable answer them we wouldn't be having this conversation, right?

Thanks
Steve

Offline mmccarn

  • *
  • 2,482
Re: Manage domains
« Reply #3 on: October 20, 2007, 11:58:49 PM »
Are you using http://wiki.contribs.org/SME_Site_Maker?  I've never used it so I don't know if it allows you to create virtual domains re-directs easily.

If you are, and you want to be able to use virtual domains, you could raise a 'new feature request' against this contrib in bugzilla.

If you aren't you should raise a 'new feature request' against the base SME in bugzilla.


Re: Manage domains
« Reply #4 on: October 22, 2007, 05:25:52 AM »
I have had a quick go at it but have not fully tested it yes. Time constraints.

It would be better if it had a proper management interface, so I hope that somebody will make one for it.  I found that I didn't know what to put in some of the entry positions.  Basically I need to do some more testing and get a site up and running from the use of this tool.

would be best if this tool was properly integrated into the domain manager with a tick the boxes setup guide.

Thanks
Steve

Re: Manage domains
« Reply #5 on: October 22, 2007, 10:28:10 PM »
If that was an acceptable answer them we wouldn't be having this conversation, right?

Thanks
Steve

Not quite, Steve. HF is right.

It really helps if you look at the manual and understand SME design before you question it.  I have been humbled many times with "read the manual" and finally understood that the SME design usually included what I was looking for; I just didn't always know where to find it.

Please read:

http://wiki.contribs.org/SME_Server:Documentation:Administration_Manual:Chapter14


I-bays are the heart of handling 'information' in SME hence the name i-bay ('information-bay').  If I understand your posting properly, you are looking for where you reposit your site and manage it's properties, not a place to develop your site.  The ibay is the place.  If you host virtual domains, set the ibay up first, copy your site to it, add the domain in domain manager and you should be able to URL right to it (providing the DNS points to your server).  It is really quite simple once you understand the structure.  I have been using it for years flawlessly.

By the way,  the ibays are kept under:  /home/e-smith/files/ibays... if you need to know that.

You're welcome,
Uniqsys  :smile:
...

Re: Manage domains
« Reply #6 on: October 23, 2007, 01:24:35 AM »
Question.  Is there a particular reason why this functionality was never included ...

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. This seems to be what you wish to do.

You assert that this proposed solution is not acceptable to you, but you give no reason for rejecting the proposed solution.

Re: Manage domains
« Reply #7 on: October 23, 2007, 05:05:56 AM »
OK but why then do most people suggest that for both security and functionality reasons its better to use the /opt folder to setup and run websites etc.

I want to run numerous cms systems like joomla etc and why then does the rmp install for joomla and all the other cms etc  rmp's install to the /opt folder.

If all the rpm's are installing to the /opt folder then its not unreasonable for me to suggest that the domain manager is lacking functionality because it has no options that relate to the /opt folder.

Its also not possible to setup and manage the creation or deleting of mysql databases from the domain manager.  Having used ispconfig for some time now there are certain things pertaining directly to domain management that are lacking in the sme system.  I can see and understand that the business managment areas have been very well developed and I love them (its why I'm using sme) but I can also see that this has been at the expense of the domain managment side which still is lacking in its functionality.

I have no doubt that over time this will change.  At the moment all these functions are possible but its through the use of command line, sim links, phpmysql manager, etc etc that many people comming to linux and sme for the first time will have lots of issues adjusting to this way of doing things, especialy when everything else in sme is done via a nice managment consol.  These are tools that should only be resorted to when a person has a problem and should not be first line options.

anyway Im just putting it out there becouse thats what I experiance and its reflected in the number of threads on the forum pertaining to domain managment and the /opt folder.

Thanks
Steve
 
:)

Re: Manage domains
« Reply #8 on: October 23, 2007, 07:00:59 AM »
I would like to put my support forward for steve1084. If as this topic suggests that I-Bays are the best places for web content, then why have the SME Sitemaker, isn't this going against the convention that is being touted here?

Re: Manage domains
« Reply #9 on: October 23, 2007, 08:07:53 AM »
Hi Girkers

Thanks for the support

I simply want to highlight something of my personal experience back to the development team so that they can see that regardless of the systems they have put in place many people are having difficulties because of the way SME is being used even if that way was not intended and that the current Domain Manager is not able to deal with the ways that people are using SME and the /opt folder.

It would be nice if something could be done to address these issues or at least to acknowledge them and have a second look at the way domain management is being handled.  especially now that most websites used by people are CMS systems using either php, mysql, java, asp, and ruby. and that many people want the business side of SME but also want greater control over there websites, and acknowledge that they are being installed and used from the /opt folder and to address this within the Domain Manager.

Simply stating that everyone should use the I-bay folders doesn't address the issues people are havening.

Thanks
Steve

:)

Offline raem

  • *
  • 3,972
Re: Manage domains
« Reply #10 on: October 23, 2007, 10:47:38 PM »
steve1084

You can put a redirect link in the ibay, search as there have been examples
posted.
Have you tried Sitemaker to see if it will allow you to do what you want ?

The best place for a New Feature Request (NFR) is in the bugtracker.
Bugzilla is used for many more things than just tracking code bugs.
Create a NFR bug & summarise & put in a link to this thread.
Search first also, to see if has already been requested in bugzilla.

....and also add a link here to the bug report.
...

Re: Manage domains
« Reply #11 on: October 24, 2007, 07:20:13 AM »
Hi ray

Yes you are correct and I have had a brief look at a number of solutions,  I haven't fully explored site maker as yet.  My feeling is that these are all work arounds for something that should really be done from the domain manager.

But as you suggest I will put a comment into the bug tracker and see what eventuates. maybe I'm not the only one who sees that a bit more work needs to be done on the domain management side of things.  Not because there is anything wrong with the current manager but because of the way people are using SME which was not fully anticipated.

Thanks
Steve
:)

Offline william_syd

  • ****
  • 1,608
  • Nothing to see here.
    • http://www.magicwilly.info
Re: Manage domains
« Reply #12 on: December 11, 2007, 01:35:28 PM »
Did someone post some httpd.conf fragment to work around this ?

I did raise a NFR bug sometime ago though I lack the skills to take it further.  http://bugs.contribs.org/show_bug.cgi?id=2460

I did find something in the wiki that looks useful.  http://wiki.contribs.org/Web_Application_RPM#Webserver_templates
Regards,
William

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

Re: Manage domains
« Reply #13 on: February 25, 2008, 10:24:30 PM »
OK but why then do most people suggest that for both security and functionality reasons its better to use the /opt folder to setup and run websites etc.

I want to run numerous cms systems like joomla etc and why then does the rmp install for joomla and all the other cms etc  rmp's install to the /opt folder.

If all the rpm's are installing to the /opt folder then its not unreasonable for me to suggest that the domain manager is lacking functionality because it has no options that relate to the /opt folder.

At the moment all these functions are possible but its through the use of command line, sim links, phpmysql manager, etc etc that many people coming to linux and sme for the first time will have lots of issues adjusting to this way of doing things, especialy when everything else in sme is done via a nice managment consol.  These are tools that should only be resorted to when a person has a problem and should not be first line options.

anyway Im just putting it out there because thats what I experience and its reflected in the number of threads on the forum pertaining to domain management and the /opt folder.

Thanks
Steve
 
:)


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. This seems to be what you wish to do.

You assert that this proposed solution is not acceptable to you, but you give no reason for rejecting the proposed solution.

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

Is it as simple as contrib developers will plop the contrib into /opt and you config, test, setup there and when complete just move it to an ibay of your choice.

Is it that simple a concept or is there more to be considered as others including myself have stated.

Certainly it was not address in this thread to my satisfaction in this thread.

I do think this issue needs to be resolved and made a stickie and posted on the main page of the wiki if it ever gets resolved.

If I did miss the resolution somewhere please point it out and I apologize in advance to all concerned.

Offline raem

  • *
  • 3,972
Re: Manage domains
« Reply #14 on: February 25, 2008, 11:11:13 PM »
electroman00

Nice rant, but not terribly useful.
Better that you create a NFR bug (new feature request), and add your rational justification for the feature.

Quote
If I did miss the resolution somewhere please point it out and I apologize in advance to all concerned.

In the post immediately before yours.
http://wiki.contribs.org/Web_Application_RPM#Webserver_templates

...although it's not the server manager panel answer you want.
...

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.
...

Offline jumba

  • ****
  • 291
  • Donations: July 2007 - $ 20.00
    • Smeserver på svenska!
Re: Manage domains
« Reply #30 on: May 25, 2008, 07:05:08 PM »
I'm trying to do some "jiggery pokery", but somehow it seems I've misunderstood something:

Scenario:

Smeserver 7.3 with TWO separate Joomla installations. The installations were made with the help of SMEServerSiteMaker, and they work OK.

So I have:

/opt/joomla1 & /opt/joomla2

Pointing the browser at http://servername/joomla1 directs to the /opt/joomla1 installation, and http://servername/joomla2 directs to the /opt/joomla2

SiteMaker also created two files:

Code: [Select]
/opt/99SMESiteMaker_joomla1
/opt/99SMESiteMaker_joomla2
Now I want to connect  /opt/joomla2 with a REAL domain name, so I try to follow the instructions from http://wiki.contribs.org/Web_Application_Redirect_Tutorial

This is what I did:

First of course the A records ”@” and ”www” were (externally) pointed to the IP address of the server.

Created the IBAY "joomla2bay"

Added the nameofmyvirtualdomain.com in server-manager as a virtual domain,  and pointing this to the ibay "joomla2bay"

At the server, the following things were done:

Created a file /etc/e-smith/templates/etc/httpd/conf/httpd.conf/80OptDomainSMESiteMaker_joomla2 , contining thje following lines:
Code: [Select]
{
  my $status = $joomla2{'status'} || "disabled";
  return "    # joomla2-status is disabled.\n" 
          unless $status eq 'enabled';
  my $domain = $joomla2{'domain'} || "disabled";
  return "    # no hostname or domain for joomla2 defined\n"
          if $domain eq 'disabled';
  my $DocRoot = "/opt/joomla2";
  $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"; 
}

Finally, I executed the following db-commands:

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

...it doesn't work :sad:

Also, the command

Code: [Select]
config show joomla2
returns NOTHING!

(Also, "config show" doesn't include anything from my above lines)

I would be very happy if someone could point out what I have misunderstood here. As you can see, I'm all screwed up today so I really need some guideance :shock: :shock: :shock:

Offline pfloor

  • ****
  • 888
Re: Manage domains
« Reply #31 on: May 25, 2008, 08:31:30 PM »
Finally, I executed the following db-commands:

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


...it doesn't work :sad:

Also, the command

Code: [Select]
config show joomla2
returns NOTHING!

(Also, "config show" doesn't include anything from my above lines)


You can't use "setprop" on a db key that doesn't exist, you must create the key first with something like:

Code: [Select]
config set joomla2 service
OR do it all in one line as follows:

Code: [Select]
config set joomla2 service domain www.nameofmyvirtualdomain.com status enabled
Let's break that up so you understand:

"config set joomla2 service" creates the key joomla2 as a service "domain www.nameofmyvirtualdomain.com" sets the first property and "status enabled" sets the second property and also tells the system that this service is enabled.

Hope that helps.

-Paul


In life, you must either "Push, Pull or Get out of the way!"

Offline jumba

  • ****
  • 291
  • Donations: July 2007 - $ 20.00
    • Smeserver på svenska!
Re: Manage domains
« Reply #32 on: May 25, 2008, 10:07:52 PM »
You can't use "setprop" on a db key that doesn't exist, you must create the key first with something like:

Let's break that up so you understand:

"config set joomla2 service" creates the key joomla2 as a service "domain www.nameofmyvirtualdomain.com" sets the first property and "status enabled" sets the second property and also tells the system that this service is enabled.

Well, first of all many thanks for your reply! I suspected it was something like that...

(Hmm, maybe that should be mentioned in the wiki at http://wiki.contribs.org/Web_Application_Redirect_Tutorial as well?)


Anyway, I executed the command all in one line as you suggested, and now we're at least a bit closer:

Code: [Select]
config show joomla2
joomla2=service
    domain=www.nameofmyvirtualdomain.com
    status=enabled

...but it's still not working, and it doesn't look even close to the example output from wiki:

Code: [Select]
joomla=service
   DbName=joomla
   DbPassword=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
   DbUser=joomlauser
   Name=Joomla
   PublicAccess=global
   domain=www.myvirtualdomain.com
   status=enabled

Any more hints????


Offline byte

  • *
  • 2,183
Re: Manage domains
« Reply #33 on: May 25, 2008, 11:09:11 PM »
Moving this topic to the SME Server 7.x forum, it is more appropriate there. Thanks!
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

Offline jumba

  • ****
  • 291
  • Donations: July 2007 - $ 20.00
    • Smeserver på svenska!
Re: Manage domains
« Reply #34 on: May 25, 2008, 11:14:53 PM »
Hi again:

More strange findings:

http://www.nameofmyvirtualdomain.com/ doesn't work correct, but http://www.nameofmyvirtualdomain.com/index.php/ points to the site "joomla2" (correct!)

Am I getting closer, or what's screwed up here???

Offline janet

  • ****
  • 4,803
Re: Manage domains
« Reply #35 on: May 26, 2008, 08:00:57 AM »
jumba

Quote
http://www.nameofmyvirtualdomain.com/ doesn't work correct

Use the exact URL you entered in the db command ie
www.nameofmyvirtualdomain.com
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline janet

  • ****
  • 4,803
Re: Manage domains
« Reply #36 on: May 26, 2008, 08:13:53 AM »
jumba

The wiki article refers by example to installing the joomla rpm, which would create the key and other "missing" configuration db entries.
As you have manually created the install using SiteMaker, then you need to manually add all those other configuration db entries you are "expecting" to see.

config set joomla2 service
config setprop joomla2 DbName joomla2
config setprop joomla2 DbPassword joomla2passwordxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
config setprop joomla2 DbUser joomla2user
config setprop joomla2 Name Joomla2
config setprop joomla2 PublicAccess global
expand-template /etc/httpd/conf/httpd.conf
sv h /service/httpd-e-smith

Make sure you use the correct (joomla2 mysql) db name, password & user, as already created in mysql
« Last Edit: May 26, 2008, 08:28:10 AM by mary »
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline jumba

  • ****
  • 291
  • Donations: July 2007 - $ 20.00
    • Smeserver på svenska!
Re: Manage domains
« Reply #37 on: May 26, 2008, 02:24:51 PM »
OK, thanks for your replies.

Now it seems like "most things" work, and I'm not sure why I should need to enter the DbName, DbPassword & DbUser stuff...

What difference would that make?

A small (minor) problem remains though:

How do I handle incoming traffic to http://www.nameofmyvirtualdomain.com as well as http://nameofmyvirtualdomain.com ???

Do I have to create a separate db entry for traffic coming in to http://nameofmyvirtualdomain.com, or is it possible to add a new db key for that address?

Can I  "setprop" more than one value on a db key and if so, how is the syntax?

Code: [Select]
config setprop joomla2 domain www.nameofmyvirtualdomain.com
config setprop joomla2 domain nameofmyvirtualdomain.com

 

Offline janet

  • ****
  • 4,803
Re: Manage domains
« Reply #38 on: May 26, 2008, 07:57:37 PM »
jumba

Quote
...I'm not sure why I should need to enter the DbName, DbPassword & DbUser stuff...

Only if required and supported (in code) by the contrib.


Quote
Can I  "setprop" more than one value on a db key and if so, how is the syntax?

The second db command will replace the first.

Commonly (again where the underlying code supports it) you put a , or : between values, but unless supported by code this does not work, and in this case I think this is not supported

I'm guessing that a second manually created db entry ie for joomla3, along with the 2 custom templates which point at joomla2 with a different URL should work, untested by me though.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.