Jaws 0.8.0 + Multiple Instance

Discussion about advanced usage, web server stuff, proxies, etc.

Jaws 0.8.0 + Multiple Instance

Postby afz » Mon Aug 04, 2008 1:15 pm

In this Topic i try to explain, how we can install more than one site with a Jaws.
for example i like have two separate website with two (parked/add on) domain or two subdomain("foo" and "bar") with one host.
By default jaws configuration stored in config/JawsConfig.php file.
in first step we install a jaws, then goto config directory and rename JawsConfig.php to "foo.php" and edit it for change JAWS_DATA path for example i change JAS_DATA to JAWS_IPATH . 'data'. 'foo'. DIRECTORY_SEPARATOR then create "foo" directory in data directory and copy all file in data directory into it.
again install new jaws and repeat above steps but instead of "foo" use "bar".
at index.php and also admin.php we require replace:
Code: Select all
require PATH_SCRIPT . '/config/JawsConfig.php';

with:
Code: Select all
if (strpos($_SERVER["HTTP_HOST"], 'foo.') !== false) {
  require PATH_SCRIPT . '/config/foo.php';
} elseif (strpos($_SERVER["HTTP_HOST"], 'bar.') !== false) {
  require PATH_SCRIPT . '/config/bar.php';
} else {
  require PATH_SCRIPT . '/config/JawsConfig.php';
}

Security Note: This is a sample code, and you need parse $_SERVER["HTTP_HOST"]
afz
 
Posts: 694
Joined: Sat Apr 12, 2008 1:46 am

Re: Jaws 0.8.0 + Multiple Instance

Postby eddiegj » Mon Aug 04, 2008 9:24 pm

Nice I'm already with an script, now i get the idea of how it works...
Eddie to the rescue...
Image
http://gjaltema-online.nl/ check it out!
eddiegj
 
Posts: 86
Joined: Thu May 01, 2008 6:18 pm
Location: Nederland, Dokkum

Re: Jaws 0.8.0 + Multiple Instance

Postby eddiegj » Tue Aug 05, 2008 10:14 pm

Is it posible to sync the user accounts?
For example keep 1 table with usernames (and there settings)?
(Wordpress already has this feature)
Eddie to the rescue...
Image
http://gjaltema-online.nl/ check it out!
eddiegj
 
Posts: 86
Joined: Thu May 01, 2008 6:18 pm
Location: Nederland, Dokkum

Re: Jaws 0.8.0 + Multiple Instance

Postby afz » Wed Aug 06, 2008 2:37 am

eddiegj wrote:Is it posible to sync the user accounts?
For example keep 1 table with usernames (and there settings)?
(Wordpress already has this feature)

if you use table prefix same as sundomain name by little changes you can do this.
- adding a field to users/groups table for store instance name
- little changes in querys related to users and groups for example:
-- removing [[]] around of [[users]], [[groups]] and [[users_groups]] for prevent affect auto set prefix
-- use new added field(for store instance name(subdomain)) in queries if needed
afz
 
Posts: 694
Joined: Sat Apr 12, 2008 1:46 am

Re: Jaws 0.8.0 + Multiple Instance

Postby eddiegj » Tue Sep 09, 2008 1:05 pm

I really have problems making an working "installation" script, i tried to use portions of the normal install script, but can't get things working.
Making subdomains and the user config's are not the problem (even with the use of Direct Admin API for subdomains).

Any ideas?
Eddie to the rescue...
Image
http://gjaltema-online.nl/ check it out!
eddiegj
 
Posts: 86
Joined: Thu May 01, 2008 6:18 pm
Location: Nederland, Dokkum

Re: Jaws 0.8.0 + Multiple Instance

Postby tinac » Tue Apr 12, 2011 6:38 am

Dear afz,

I just discovered Jaws, I am still trying to test all the features, but I have a question:
I have a main site with many subsites hosted in subdomains. Can I use Jaws to manage all websites from one Control Panel?

Is Jaws suitable for mobile site administration?

Thank you for your efforts.
tinac
 
Posts: 1
Joined: Tue Apr 12, 2011 6:33 am

Re: Jaws 0.8.0 + Multiple Instance

Postby exceptionz » Sat Jun 25, 2011 10:20 pm

If you mean multiple sites with one jaws installation, it is not possible yet...
exceptionz
 
Posts: 101
Joined: Tue Nov 16, 2010 2:41 pm
Location: somewhere between / and /home/user/


Return to Advanced topics

Who is online

Users browsing this forum: No registered users and 1 guest

cron