So, I've got multisite up and running on GoDaddy... for the most part. Regular domains using shared or prefixed database tables work fine. When I try to use subdomains, something isn't working. Here's my setup:

installed drupal into {root}/drupal

http://www.mysite.com (points to {root}/drupal)
folder: {root}/drupal/sites/mysite.com
dbprefix: mysite

http://dev.mysite.com (points to {root}/drupal)
folder: {root}/drupal/sites/dev.mysite.com
dbprefix: mysitedev

Here are the rewrite rules in my .htaccess file:

  # Modify the RewriteBase if you are using Drupal in a subdirectory and
  # the rewrite rules are not working properly.
  RewriteBase /

  # Rewrite old-style URLs of the form 'node.php?id=x'.
  #RewriteCond %{REQUEST_FILENAME} !-f
  #RewriteCond %{REQUEST_FILENAME} !-d
  #RewriteCond %{QUERY_STRING} ^id=([^&]+)$
  #RewriteRule node.php index.php?q=node/view/%1 [L]

  # Rewrite old-style URLs of the form 'module.php?mod=x'.
  #RewriteCond %{REQUEST_FILENAME} !-f
  #RewriteCond %{REQUEST_FILENAME} !-d
  #RewriteCond %{QUERY_STRING} ^mod=([^&]+)$
  #RewriteRule module.php index.php?q=%1 [L]

  # Rewrite current-style URLs of the form 'index.php?q=x'.
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

www.mysite.com works fine, but dev.mysite.com returns a "server not found" error. I'm thinking it's something wrong with the .htaccess file. I've read some comments about symlinks, but there's got to be a cleaner solution than that.

Please help. I'm sooooo close to being a happy drupaller!!!

B

Comments

ChangeMachine’s picture

Is your login from your 2nd domain working now? I've been following your progress a bit, but i figure i'll just let you lose your hair over it and then reap the rewards of your labor ; D Kidding. I'd love to help, but i'm still theorizing my first site. If i learn anything useful, i'll keep you posted. I too am on goDaddy hosting, thinking about doing a multisite. Are you on a VPS? I'm still on shared.

Have you had any luck previously (in this particular multisite) with sub.domains, ie, has it been an either/or thing ("now i've got domains working but the SUB.domains won't work! Argh!")

citizen Vern

bigbman’s picture

No luck yet. I am on Shared premium. Still no luck with SUB.domains. I'm almost sure it has something to do with the .htaccess file. Let me know if I can help you with anything in regards to GoDaddy hosting. I've got a couple of regular domain sites up and running.

ChangeMachine’s picture

That seems like the culprit from what i've been bumping into. I remember also seeing something tricky with vhosts and... then i forgot it. : ) I'm still trying to get my database set up properly. Know anything about setting the database prefixes in the settings.php? There's a comment about them in the code but then a second part about a "Database URL format" that it doesn't explain. Nothing about it in the tutorial I read either. If you think you can help let me know and i'll send you to my post. Don't want to pollute this one.

Thanks,
citizenvern

bigbman’s picture

I'm using database prefixes successfully. Feel free to send me the post, and I'll try to help out.

Still no luck on my end. Does anyone have any suggestions? PLEASE help!

chadj’s picture

You don't seem to be pulling out the subdomain in the .htaccess file. Did you want to? If so, you would use syntax something like this:

RewriteCond %{HTTP_HOST} ([^.]+)\.mysite\.com$
RewriteRule ^(.*)$ index.php?q=$1&subdomain=%1 [L,QSA]

- Chad

kenyan’s picture

bigbman, did you sort out your issues. I'm running drupal on multiple sites on my premium account at godaddy(used the installer) and some on subdomains too.

I then bought a VPS. Now this is a whole different can of worms.
Drupal must be installed manually. Then of course comes the apache, php.ini and .htaccess configurations which I believe I have been getting all wrong.
I get this:
You have decided to open
'http://******.com/'? <--- this should hint something at me as it's not picking the default .php
which is of type:
Type: application/x-httpd-php

Then when I try point the browser directly at index.php (in the root), iI get the message "Page not found" but I know it is there.

I have trawled the net and tried everything, edited httpd.conf (to include .php), php.ini and .htaccess all to no avail.
Anybody??

kenyan’s picture

Well,what do you know!
I asked godaddy if they could check the apache and php.ini configuration for me. And....
I got no reply. This guys really mean it when they say 'unmanaged!!!
So I asked for a server reprovisioning.
I had tried deleting the domains I created in Plesk 8.2, recreating them and then uploading (using scp) a fresh drupal tar file and uncompressing under the httpdocs folder but no cigar.
After the reprovision, which took about one hour (??) , I went through the upload steps again, fired up firefox (that a pun?) and.......voila!!
I really cant't believe it could have been that easy.
Keep you guys updated as I load modules and see what happens.
I will start with ubercart as the site I am building is a travel site and I intend to see if I can force the module catalogs to serve a service catalog instead of physicals (does anyone ever realise that we may not need to ship or download anything to run an online store?)
Later.

Spinuzzi’s picture

I can only get my drupal install working on a Godaddy shared plan if I don't have any .htaccess files in the directories above it! ANY .htaccess file seems to cause a server error. Will keep trying...