Hello,

I'm still brand new with Drupal. I would like to create a new site, but I have to use the same server. I'm trying to find a way to do it without using Virtual Host (I'm waiting for servers response, but I probably won't be able to do it).

Does multi-site need the Virtual Host? I have been reading (http://drupal.org/node/53705, http://idcminnovations.com/?q=node/109) I have to set up each site in

mydomain/sites/all-->all the common files
mydomain/sites/default--> files for the main site
mydomain/sites/newsite-->files for the new site

But I don't have clear if it needs a virtual host or not. If not, the second problem the main site is already installed and working, and I didn't put the files in sites/all and sites/default. If I use this way, can I just copy the folders to those folders? What would be the url to go to the newsite?

And if I use this way (still thinking I will not need virtual host), shall I create a different database for the second site?

I understand that using one server I cannot just install drupal twice... but I hope there is a easy way to just create a second site (and a third, a fourth...) without the virtual host.

Thank you

Comments

vm’s picture

you do not need a virtual host. You can set up subdomains on your server and use multisites.

the only thing I see in your description that scares me a bit is the use of the word "files"

mydomain/sites/all-->all the common files
mydomain/sites/default--> files for the main site
mydomain/sites/newsite-->files for the new site

you don't mean drupal installation files do you? ie, index.php and the like?

dresde’s picture

Thanks a lot, and sorry, I meant folders (modules, themes and etc). So I can use it use like that? Can I just copy the folders and it will work ok? Because now everything is in the folder "mydomain", and for what I have read to use multi-site I should move them (modules, themes...) to mydomain/all and mydomain/default. I want to be sure that moving those the already working site is not going to crash, or that I don't need to change links or whatever (and if so, which links).

And what would be the URL to access the new site? www.mydomain.com/newsite? Is just for a BETA version of other site so I don't care about the url.

vm’s picture

contrib modules you only want used on the default site should go into sites/default/modules
contrib modules you want available to all sites should go into sites/all/modules

themes follow the same ideology.

I'd disable the modules before moving them with your site in offline mode. I'd then re-enable the modules after the move.

I'd not do this without first backing up your database and original files and folders.

I'd never used subfolders only subdomains. ie site1.maindomain.com site2.maindomain.com and I only do that when I can control the document root of the subdomains. ie: my main sites is not in the public root, it is in a folder called mainsite

ie:
public_html
-- mainsite folder
-- site2 folder - created by host when creating a subdomain. document foot is pointed to mainsite folder
-- site3 folder - created by host when creating a subdomain. document foot is pointed to mainsite folder

I think use a redirect to mainsite folder for browser calls to www.maindomain.com

Personally, multisites is ALOT of trouble to go through if you really don't need them. Why not just use subdomains and separate installs?

dresde’s picture

Hi there,

Thank you VeryMisunderstood. I want to use multi-sites because this will be just a beta to show a project, but a new domain will only be 10 euros so is more than affordable.

Right now, in my server I have:
www.mydomain.com-->the main site, not in drupal, just CSS and XHTML.
www.mysecondsite.com-->second site in the same server, this is the one in drupal and its located in the folder public_html under the name "myseconddomain"

I tried to create a folder in "mydomain" and install the new beta there (so it would be in www.mydomain.com/beta), but when I configure the database (a new one or the same of "mysecondsite") it gives me error, and I assume it's because I already have a previous installation of drupal.

If I can just make a separate installation it would me much easier, so how can I make the second installation work? Do I need the new domain or am I missing something?

manji51’s picture

Andres,

I found this post when I was looking for information on setting up multi-sites on my system. After I worked my way through the situation, I documented my path, just in case I needed to do it again. If that's what you were trying to do, maybe it helps?