Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
687 views
in Q2A Core by
Ok I have q2a site in root server and now copy in subdomain.

Question is how to install copy is subdomain with same users database. Users can login both sites with common user name and password.

pl give brief and step by step information

1 Answer

+1 vote
by

Follow the steps 

  1. Create a sub domain .
  2. Most probably the subdomain will be another folder in yor main server .
  3. copy all q2a files to the sub domain folder . 
  4. give same credentials that you have given in the main domain qa-config.php file . Save . 
  5. Now you sub domain will point to your main database 

But I am not sure why you are going to do with these kind strange setups 

by
should i need to change anything in config file because i am getting 500 internal error
by
which config file you are talking about . it is server config file or qa-config.php
by
qa config file i have changed table prefix only and nothing else now during install asking me create  admin user name password.

I am looking that all users including admin use same account for subdomain also
pl help
by
if you are changing the table prefix it wont be able to use the tables . It will create the new tables . So copy the same qa-config.php file from your main site to the sub-domain folder .
by
Then it is not working giving 500 internal error
by
check the error log then . What it is saying ??
by
there is confusion in these which one need to change

define('QA_MYSQL_TABLE_PREFIX', 'qa_');
define('QA_MYSQL_USERS_PREFIX', 'qa_users_');
by
If i use same config file for both installation then if there is change in main site also change in subdomain site of if changes in subdomain site then it change main site also
by
Dont change them if you want to use your old database .
by
I need only user accounts to be shared with both installation not all questions etc
by
i m using .htaccess file code might cause 500 internal error
DirectoryIndex index.php
<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteBase
RewriteCond %{REQUEST_URI} ^(.*)//(.*)$
RewriteRule . %1/%2 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ index.php?qa-rewrite=$0&%{QUERY_STRING} [L]
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^www.subdomain.domain.com
RewriteRule (.*) http://subdomain.domain.com/$1 [R=301,L]
</IfModule>
by
I think you are trying to do something networking sites . I would suggest you to use https://github.com/NoahY/q2a-network plugin created by NoahY
by
i tried this plugin but it is not clear how to install this
by
there are very clear instructions in the github repo ReadMe page .just follow that
by
unable to understand these
1. Place your source Q2A files in a directory outside of your site root, e.g. /home/me/q2a/

2. Make a new directory somewhere else on your server where your actual q2a site will reside, e.g. /var/www/q2a/

3. Make symbolic links from the source files (not the root directory) to the new directory:
::
    ln -s /home/me/q2a/* /var/www/q2a/

Note: if you are going to use neat urls, copy or link to the original .htaccess as well:
::
    ln -s /home/me/q2a/.htaccess /var/www/q2a/

4. Copy the original qa-config-example.php to qa-config.php in the new directory    

5. Edit the new qa-config.php file as needed, using a unique table prefix.

6. Repeat steps 2-5 for each site, making sure the table prefix of each site is unique.
by
I am sorry Bro . It is in very simple language only . I can not explain more simpler than this . I will pray for your success . Thank you
by
After reading lot of question and answer found it is pretty simple.

setup new subdomain site:   

jobs.askoye.com

thanks for your help
by
Thats cool . Good job . What ever you have done research today , give a answer under this question . It will help few more new guys . Thank you .
by
subdomain site is created but problem still there with common users sharing both sites. only admin shared as a common users rest not working
...