views:

22

answers:

2

Hello, I am trying to setup drupal to host multiple sites which will not effect each other. My pages are hosted on a shared hosting service and I only have access to cPanel. Following the instructions on the web that I found using google, I have done the following.

1 - Installed Drupal.
2 - Make a directory in sites and name it demo.sharedhost.com.
3 - Copied default.settings.php in that directory and renamed it settings.php.
4 - Created a subdomain demo.
5 - Deleted the demo folder from public_html
6 - Made sybolic link public_html/demo to sites/demo.myshost.com.

When I try to access demo.myhost.com I get listing of sites/demo.myhost.com directory instead of drupal installation.

Can you please help me setup multisites?

Thank you.

A: 

Multi Site in Drupal You need to make sure first if the server supports virtual hosts or not , You have not created the database for sites , follow that link for this, If all went well till now to install another site you shouldnt access

demo.myhost.com
instead try this
demo.myhost.com/install.php
kantu
There is no install.php present in site/demo.myhost.com folder and even if I copy the install.php from the main drupal folder it doesn't work.
Ibrahim
Dont copy to the site folder just go to demo.myhost.com/install.php , why wont you gie a try and post any errors after this
kantu
As I mentioned that I went to demo.myhost.com/install.php and I get 404 not found error. Anyway the solution to the problem was symbolic link, which I mentioned in the answer below and the site is working.
Ibrahim
A: 

Finally I found the answer. In 6th step I made a symbolic link to drupal_installation/sites/demo.myhost.com, these instructions are wrong on the internet. The sybolic link should be targeted to drupal_installation path.

So here is my final steps:

1 - Installed Drupal in ~/public_html/drupal_path.
2 - Make a directory in ~/public_html/drupal_path/sites and name it demo.myhost.com.
3 - Copied default.settings.php in  ~/public_html/drupal_path/sites/demo.myhost.com directory and renamed it settings.php.
4 - Created a subdomain demo.myhost.com.
5 - Deleted the demo folder from public_html, which was created automatically.
6 - Made sybolic link as follow:
    ln -s ~/public_html/drupal_path ~/public_html/demo
    Note: If you do not have access to shell then use the following php script to make the symlink:
    
7 - Finally visit the demo site by http://demo.myhost.com and you will be prompted for new drupal installation.

I am explaining the steps again so someone like me will not have to waste time reading different solutions posted on the internet.

Please let me know if something is not clear.

Ibrahim
Instead you can copy settings.php already existing and change db name in it
kantu
step 3 mentioned the copying of setting.php file and I can change the db setting but I prefer a fresh install and let drupal take care of modifying settings.php
Ibrahim