Finally, I have Drupal installed on my Local computer.

How can I set up two separate websites on one local host?

Thank you for your feedback.

Comments

vm’s picture

use subdirectories

mohanrajthangarasu’s picture

I use WAMP to work site development in local. If you see WAMP following stuff would be useful. go to www folder then create and name a folder "demo1" move all the drupal files. Using phpmyadmin create a DB and DB user with pass. Change the DB details in setting.php and go ahead with installation.

you can check out the local site by typing following localhost/demo1

Likewise you can procedd "demo2", "demo3" and etc.

if you still face any problem post me back.

kanshu’s picture

I'm currently installing Drupal as well, but I'm just curious as to why you need to install into a localhost. Wouldn't it be more realistic to install on a host server somewhere on the internet?

vm’s picture

you create a server environment on your local machine. There are quite a few pre bundled packages that do this for you for both windows and mac.

more realistic to do on a server? not really. why pay to develop when you can prepare then pay to launch? and if you are doing development for more than one site you can have your test sites local so that you aren't constantly putting your production site at risk with changes without testing them.

see: http://drupal.org/setting-up-development-environment for more info

kanshu’s picture

Your reasoning is right if neither paid nor free host server is available. But I have access to both. And anybody can have access to a free host server. So, as to your question why pay to develop when you can prepare then pay to launch? You don't need to pay if it's free. And it's a moot question, if I already did.

Anyway, I'll start a new thread for my own installation problem right now.

vm’s picture

Why would I store client test sites on a free server? which typically are overcrowded and resouce restricted?

What If I have 4 sites I'm working on? I can put them on my laptop and work on them anywhere I choose without internet connection? without prying eyes?

local development is far superior (IMHO) but heh, to each their own.

kanshu’s picture

it seems to me that you are referring to two different people with two different needs.

If a newbie on installation of Drupal comes to this specific forum, he's not yet savvy enough to have 4 sites to work on. He's just interested in getting a Drupal site up and running to tinker with. It's just a shell site.

Like me right now, I'm installing Drupal in a live site hosted in my host server. The site is new. I don't think a single soul is aware that it exists. So, no problem with prying eyes.

I may agree with you on putting all your Drupal sites in your laptop later. But by that time, I won't come here to ask how to install Drupal because I've already done a few live installations.

Anyway, I hope I'm making sense.

vm’s picture

the op states he/she is adding second site. He/she wants to do it on his/her local machine ;) Ok, maybe I shouldn't have used "clients" in my setence or the number 4. Doing so introduced a another level of savvy, but utimately the OP is interested in learning about how to work in a local environment? That's the inference I took as the OP has been savvy enough to get both the local environment and a single site already working on his/her local machine according to their question.

prying eyes, don't have to be human, they can also be bots. ie: search engines.

There is nothing "wrong with a live public server. If that is what works for you. That's great! While nothing wrong ... there can be considered, "pro's and con's" to both.

I've only mentioned a fraction of the beneifts a local environment can provide if you/anyone else is into some of the other things you can do. Another thing one might consider a "pro" would be that those who run a local development environment get to learn a bit about the sysadmin side of things as well. working on module, building multiple themes learning to write small custom queries on the database, trying to learn the innards of drupal with the ability to break stuff in the process all free from the worry about breaking the production site and enduring the inevitable panic that ensues when you can't recover from something "quickly".

It may help not to hijack a thread so as not to confuse the OP's issue with your own.

kanshu’s picture

Sorry to appear as you put it "hijacking a thread". It only appeared that way because you were the first to answer the question. If it had been the original poster, I'd have gotten more information on the problem. And we'd just be having a conversation about our problems.

Anyway, I'm moving on.