Koozali.org formerly Contribs.org

Manage domains

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.