Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

How to install multisite q2a with single login in subdirectories?

+4 votes
asked Apr 12, 2017 in Q2A Core by john123

How to install multisite q2a in subdirectories with single login for all users.





I tired many times, it does not share user logins. I searched in many questions but process is not clear.

I changed user prefix in config file in 2nd and 3rd sites. It would integrate database but it would ask me to create new user in subsites in 1st, 2nd and 3rd sites.

I know that every subsite will have its own database integrated in one database but how it would use same userlogins? Problem with Keeping same database for all subsites would just copy the same content on all subsites.

I want content to be different all subsites but userlogins remain the same.

Thanks for your help in advance.
Q2A version: Latest

3 Answers

+1 vote
answered Apr 12, 2017 by ProThoughts
Here is exact solution, it works fine for user logins...I verified....but there is one issue....  user points are not sync between diff sites...

commented Apr 12, 2017 by john123
@Prothoughts, Thank you for your reply.  I need clarification for sites in subdirectories.

I tried the solution with single db for all subsites. All databases integrate in single database but it does not integrate users on all sites. Only content. I want content to be different on all sites but userlogins would remain the same. In single db there are multiple user tables per site. That's why it does not share same users across all sites.

Sharing points across all sites is not important for me.
0 votes
answered Apr 12, 2017 by moha16
you can do that
use only one sql
commented Apr 12, 2017 by john123
@moha16, Do i need to combine user tables in single db or enable blob feature? because even in one integrated database for all subsites, users are not same.
commented Apr 14, 2017 by moha16
yes tables tables better
+2 votes
answered Apr 12, 2017 by sama55

The elements required to realize multi-site are as follows.

Definition in qa-config.php Value of main site Value of sub site

※1 In default, it is "qa_". However, you can change it. For example, "qa1_", etc.
※2 Unnecessary
※3 You will need to enable and assign specific folder. In addition, you need to export blob data from DB to file system in "Admin" > "Stats".
※4 Unnecessary
※5 You need to define prefix other than "qa_" OR "qa1_". For example, it is "qasite1_" or ""qasite2_"" ...
※6 You need to define as "qa_". It must be same with QA_MYSQL_TABLE_PREFIX of main site.
※7 You need to assign folder same with main site.  In addition, you need to export blob data from DB to file system in "Admin" > "Stats".
※8 You need to define top level domain. For exmaple, ".mydomain.com"

These are multi-site settings I understand.

In order to solve the problem, you need to show qa-config.php of each sites. 

commented Apr 12, 2017 by john123
edited Apr 12, 2017 by john123
@sama55, Thank you for your detailed answer. I will work on it and get back to you shortly.
commented Apr 15, 2017 by john123
Hello Sama55, I tried to follow instructions but looks like I can't figure out to get blog data from db and import into "admin" > Stats.

and one more thing with cookie setting. if I am installing in subdirectory of domain- should i use - ".mydomain.com" or  "mydomain.com."

Thanks for your help. I can give you access to my test cpanel if you can help me with this.
commented Apr 16, 2017 by sama55

"Blobs to disk" and "Blobs to database" buttons are displayed on following condition.
"Blobs to disk": QA_BLOBS_DIRECTORY is enable. AND data exit in database.
"Blobs to database": QA_BLOBS_DIRECTORY is enable. AND file exist  in folder.

You should use ".mydomain.com". Leave the leading "." (dot).
Read commnet of QA_COOKIE_DOMAIN carefully in qa-config.php.