I have two domain names and i want to use multisites
my1domain.com
my2domain.com

i have drupal installed on "my1domain.com"

I set config multisite in my1domain.com

my1domain.com/sites/default/settings.php
my1domain.com/sites/my2domain.com/settings.php

In apache httpd.conf

for my1domain.com


DocumentRoot "/home/web/my1domain/"
php_admin_flag safe_mode Off
ServerName my1domain.com
ServerAlias *.my1domain.com

allow from all
Options +Indexes

and for my2domain.com


DocumentRoot "/home/web/my1domain/sites/my1domain.com/"
php_admin_flag safe_mode Off
ServerName my1domain.com
ServerAlias *.my1domain.com

allow from all
Options +Indexes

When i access mydomain2.com i receive this
Forbidden
You don't have permission to access / on this server.

I try to chmod 777 my1domain.com/sites/my2domain.com/ but nothing work

I don't know what i am doing wrong , i read all docs here about multisites, but i don't find any info about doing multisites with different domain names

Comments

dvessel’s picture

I'm not so sure that's the best way to structure a second domain but try changing the document root for site2 and the server name & alias.

DocumentRoot "/home/web/my1domain/"
php_admin_flag safe_mode Off
ServerName my2domain.com
ServerAlias *.my2domain.com

You can't point into the site's settings and expect it to work.

joon

toma’s picture

Thanks for your info, now it works fine :)

---
Drupaldemo now 5.0
http://www.drupaldemo.org

toma’s picture

I have another issue

i set for every domain in setting

sites/my1domain.com
sites/settings.php
sites/files
sites/tmp
sites/.htaccess
RewriteCond %{HTTP_HOST} !^my1domain\.com$ [NC]
RewriteRule .* http://my1domain.com/ [L,R=301]

when i point my domain to http://my1domain.com it works fine
www.my1domain.com doesn't redirect to my1domain.com

I want to use http://my1domain.com

dvessel’s picture

You set for every domain in setting?? I have no idea what you mean by that.

Where are you setting the rewrite rules? If it's the .htaccess file in the root directory then it's because your sharing the exact same root for both domains.

I don't have a clear picture of how your setting things up so try to clarify.

joon

toma’s picture

I want to use .htaccess different than the one in root directory, same thing when i want to make a robot.txt for every domaine
sites/settings/otherdomain.com
different robot.txt to
sites/settings/otherdomain2.com

the problem is when i want to make some redirection directive with .htaccess for different domains, it doesn't seems to work

Drupaldemo now 5.0
http://www.drupaldemo.org