Support

Admin Tools

#17604 JMS multisite and admintools advice

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Admin Tools version
n/a

Latest post by nicholas on Wednesday, 25 September 2013 10:20 CDT

amir00251
Mandatory information about my setup:

Have I read the related troubleshooter articles above before posting (which pages?)? Yes
Have I searched the tickets before posting? Yes
Have I read the documentation before posting (which pages?)? Yes
Joomla! version: 3.1.5
PHP version: 5.4
MySQL version: (unknown)
Host: (optional, but it helps us help you)
Admin Tools version: 2.5.8

Description of my issue:

My aim to have multiple sites in subdirectory of current main domain and I will use JMS multisite extension where there would be symbolic link in each subdirectory to main PHP but each site will have its own database. so the sites would be

domain.com
domain.com/site1
domain.com/site2
...

I just need some advice (any if you know of one) and have some questions:

1- Could all the security settings of admintools apply same to slave sites? For instance, can two layer admin login apply to www.domain.com/site1/administrator as it applied to main domain.
If there is no patch with admintools (it works with PHP and DB) so can every settings for slave sites be different and special for that site?

2- Do I need to add some extra lines or take some lines off the htaccess files in main domain or subdirectory sites? or it may be the question of adding some more directories when producing htaccess file.

3- A quick question about akeeba, if I add just the DB of new sites to akeeba extra db, would that be enough to backup all sites, considering that all the sites are in subdirectory and akeeba automatically backs up all the files under public_html?

Thank you.

dlb
  1. No, the settings in all three sites would be stored in the individual site's database.
  2. The .htaccess file in domain.com/ would apply to both slave sites. The directives would inherit from the higher folder. You could override those directives with .htaccess files in domain.com/site1 and/or domain.com/site2
  3. Yes you can, but it is a bad idea. All three sites will back up just fine, but when you go to restore, you have to restore all three sites because they are all in the same file. The only way to do a single site restore would be to manually extract the site's files and manually restore the database dump. That is possible, but it is not pretty.
Dale


Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

amir00251
Hi Dale,

Thank you for your reply. If I understand right,

1- every site can have its own security settings, so if I replicate the main DB to slave sites, it will initially will be the same settings until I change them specifically.

2- This is still confusing. "You could override those directives with .htaccess files in domain.com/site1 and/or domain.com/site2". does "could" mean that I can decide to do it or not?
In other words if I do not change anything and just copy (or use Symbolic Links) the main htaccess to slaves it would still be effective and would work fine?

3- Thanks I will try both and see which could be better.

nicholas
Akeeba Staff
Manager
Re #2 Do NOT symlink the .htaccess file. Remember that Admin Tools' .htaccess Maker asks you for the domain name and URL directory? These are stored inside the .htaccess file. If you link the .htaccess from Site A to Site B you'll break Site B.

What Dale meant is that you probably have a directory structure like this:
/public_html      # main (master) site
  |
  +-- site1       # site 1 (slave)
  |
  +-- site2       # site 2 (slave)
  |
  ...
  |
  +-- siten       # site n (slave)


Directives in .htaccess files are inherited from parent directories. This means that everything you put in the .htaccess file of the main site will be applied on the slave sites unless a .htaccess file in each slave site overrides it. If a directive is missing from a slave site but present in the main site it will be applied nonetheless.

This has two major consequences:

1. All exceptions applied to the master site will be applied to all slave sites. This MAY open loopholes for intrusion (if the hacker is very smart and your sites don't have exactly the same extensions installed)

2. If you apply a setting (e.g. redirect site's root to index.php) in the master site it will be applied to all slave sites even if you explicitly tell the .htaccess Maker NOT to apply this setting in a slave site. This makes it extremely difficult for you to set up the .htaccess files in slave sites.

Overall I recommend against using multisite solutions with Joomla! (or any CMS, actually). While they sound like a great idea to lower your administrative time they end up increasing the time you need to spend and the complexity of the solutions you need to apply (therefore the skill level of the person applying the solution, ergo the cost of maintenance). Multisites will only work trouble-free if you have near-identical sites, e.g.:
- local subsidiaries of the same organisation with identically structured sites but different local content
- the same site in different languages (but you're better off using Joomla!'s multilingual feature in this case)
- the same site with different branding (which is a subcase of the local subsidiaries case above)
In any other case using multisites will end in pain and tears. It's not obvious from the get go and you will only realise what I mean when it's too late, but please bear in mind my advice.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

amir00251
Dear Nicholas,

Thank you for taking time and having detailed reply.

The main site is located at public_html/
slave1 in public_html/slave1
slave2 in public_html/slave2

All sites have exact same template and same extensions and everything is identical, there may be differences in background images, added article categories or forum categories.

My main reason to use multisite is possibility of article sharing, user sharing, and some other features which is difficult to get if you have fully independent joomla sites.

The other good thing is that all the slave sites have same structure, so if I could edit one htaccess right, then I can only replace the slave site name in directories to make it suitable for the other sites.

I would appreciate your help to setup one if it is okay.


nicholas
Akeeba Staff
Manager
Just remember that you'll have to generate a .htaccess for all sites as the directory of each site will be different

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

amir00251
Many thanks Nicholas for advice, I will be in touch if there was any issue but hopefully would be straightforward.

I have also an issue mentioned https://www.akeebabackup.com/support/admin-tools/17589-login-and-logout-difficulties-after-admintools-setup-invalid-token.html
Should I use URL rewrite to avoid that issue?

nicholas
Akeeba Staff
Manager
See my reply to that ticket.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

amir00251
Thank you for prompt support.

nicholas
Akeeba Staff
Manager
You're welcome!

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!