Alright. Here is my problem.

I have just installed Drupal and I love it! I now would like to have another site for my dad on the same install as mine, just in a sub-domain of my sub-domain (I am "isaac.acespace.co.uk", i want him to be "tony.isaac.acespace.co.uk"). I have created the sub-domain, and renamed the "default" folder in "/sites" to "isaac.acespace.co.uk", and added a folder "tony.isaac.acespace.co.uk" which has it's own configured settings.php file (for it's own DB) and a "files" folder...

When I type in the URL "tony.isaac.acespace.co.uk" I get the plain old "403 Forbidden" error. Not even the nice Drupal one!!! It seems that Drupal is not cutting in and providing this extra "site"...

What am I doing wrong?

Isaac

Comments

alhearn’s picture

It's not clear exactly how you set up you sub-domain but here's how I did it, after much reading and investigation and experimentation. My perspective is that of someone who has a shared host account, uses cPanel, and does not have access to a shell account as would someone with a dedicated server. Given this environment, I can't use symbolic links and found that modifying .htaccess had problems and disadvantages for me.

I created a sub-domain using cPanel, which adds a subdirectory to my base domain file structure. Into that subdirectory, I simply duplicated my Drupal code, changed the sites/default/settings.php file, changed my theme to reflect the new site, and set up a new data base for the new site.

While using the same Drupal code base may be more elegant, using duplicate code is clean and simple. The only disadvantage is that if you ever update Drupal, you'll have to do it in two places, which is not a great problem.

Ishkuk’s picture

Unfortunately, you are probably right... I am in similar circumstances to you hosting wise, so that is probably what I will have to do...

Thank you for your help though, does anyone else have any ideas?

Isaac

michelle’s picture

On my old host (A Small Orange), I had to ask tech support to repoint my subdomains for me. On Site5, I can do it myself. Either way, it's just a one time thing for each subdomain to repoint it at the main Drupal directory so your host shouldn't have a problem doing it.

Michelle

Ishkuk’s picture

Do you mean Redirect? I have a redirect link on my cPanel homepage...

thanks for the help so far!

Isaac

michelle’s picture

Basically, on the hosts I've used, subdomains are automatically pointing to a sub directory of the same name off of public_html. They need to point to wherever you have the root of the Drupal code whether that be in public_html itself or in a subdir. All sites that use that code need to point to that same directory. Some sites give you the option to move the directory a subdomain uses yourself and that redirect may be it for you. Some don't have that ability and you have to contact tech support.

Give that redirect a try and see if you can get your subdomain pointing to the right directory. If that works, then you can do it yourself. :)

Michelle

Ishkuk’s picture

No... That has not worked... I will ask the tech people to do that for me... Thank you for the help...

Cupertino’s picture

Okay, first off, I went to the cpanel and set up my subdomain for each one I wanted. I did NOT do any redirection on that screen. (This sets up the dns record for the subdomain.)

The next part assumes you have shell access.. if you don't, ask your host to do this part for you. I logged into shell and went to my web folder -
cd /home/username/public_html
inside that folder was my subdomain folder. I deleted it and all the files inside, then set up a link to the main public_html folder from that:

rm -r subdomain
ln -s /home/username/public_html subdomain

Now when I go to subdomain.domain.com it will go to the sites/subdomain.domain.com/settings.php file and populate with whichever settings I've put in there.

Good luck and have fun!
-Cupertino

derbz2’s picture

but it only works for 2LD domains:
Park a subdomain, sound weird but it works.

For a better description read my blog entry.
http://www.xweb.com.au/blog/cpanel_and_drupal_multi_site_subdomains

-- Chris Herberte

Eddt’s picture

The parking solution is more common than you think - thats what it took for me to get mine to work correctly!