Need help in setting up development server on Desktop PC

Events happening in the community are now at Drupal community events on www.drupal.org.
katy5289's picture

Hello,

I'm a freelance web designer/developer with 6 years experience in handcoding HTML/CSS with 2 years experience in PHP/mySQL. However, I'm new to working with Drupal. I need help installing several working copies of Drupal 5.x on a development server on my PC. My OS is Windows XP Pro. I've installed Apache 2.2/PHP 5/mySQL 5 using downloads from apache2triad.net. It was easy to install and my PHP scripts work great. I've installed Drupal 5 with Ubercart and it works well. But when I install a second instance of Drupal 5, the previous install doesn't work. It seems like the database works only for the new install of Drupal. I would like some advice on how to set this up properly so I can have several Drupal instances working on my development server.

I'm currently reading through the Drupal Handbook on multi-site installation but there are so many different explanations, I find it quite confusing. Is there someone who can walk me through it? I would appreciate it.

Thanks in advance for any help.

Katy :-)

Seascape Web Design
Websites, Hosting and Internet Marketing

katy@seascapewebdesign.com
www.seascapewebdesign.com

Comments

Apache Virtual Hosts

dale42's picture

I hope this doesn't confuse you even more .......

For this kind of development I prefer to use Apache virtual hosts (vhost). It's a nice way of providing independent instances so you don't have to worry about projects interfering with each other. And the only way to run different versions of Drupal at the same time in one Apache instance.

I'm currently using XAMPP, which maintains the vhost configuration info in an include file. In a stock Apache install, the vhost config is typically located at the bottom of httpd.conf.

Very briefly, set up looks like this:
1) edit C:\WINDOWS\system32\drivers\etc\hosts
2) add a host entry, here's a sample from mine:

127.0.0.1 test1.digitaldoodles.com  # General purpose test instance
127.0.0.1 test2.digitaldoodles.com  # General purpose test instance
127.0.0.1 tdih.digitaldoodles.com   # TDiH Module Sandbox

The domain names can be anything, they'll only exist on your localhost. If you pick something that exists in the real world, it will now go to your PC, not the real website. In this case, I own digitaldoodles.com, so also control the real world domain names.

3) Add a vhost entry to your Apache config, example from mine:

####
##
## This Day in History
##
##
<VirtualHost *:80>
    ServerAdmin me@example.com
    DocumentRoot "C:\web\tdih"
    ServerName tdih.digitaldoodles.com
    ErrorLog logs/tdih.digitaldoodles.com-error_log
    CustomLog logs/tdih.digitaldoodles.com-access_log common
<Directory "C:\web\tdih">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>
</VirtualHost>

####
##
## Test 1 Sandbox
##
##
<VirtualHost *:80>
    ServerAdmin me@example.com
    DocumentRoot "C:\web\test1"
    ServerName test1.digitaldoodles.com
    ErrorLog logs/test1.digitaldoodles.com-error_log
    CustomLog logs/test1.digitaldoodles.com-access_log common
<Directory "C:\web\test1">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>
</VirtualHost>

Repeat as required for as many different instances as you need. I currently have around 15, but need to do a clean up :-)
The vhost config changed from my old config when I moved to XAMPP, you may need to check the exact format for your version.

4) Stop/start Apache - you should now have a working webserver at the url you created
5) Create a new database instance
6) Drop the Drupal files into your new directory
7) Run the Drupal install against your new database

For multisite on a single workstation, you still need to do steps 1,2,4,5. The different is instead of independent Drupal code trees you have one set of Drupal files and create a directory named the same as your domain name in /sites, and then configure the settings.php file. So if I had a multisite with the above hosts file from step 2, I'd have the directories:
/sites/test1.digitaldoodles.com
/sites/test2.digitaldoodles.com
/sites/tdih.digitaldoodles.com
Each directory would have it's own settings.php file, and each settings.php file points to its own database.

xampp + vhosts

rjdempsey's picture

xampp and vhosts has worked for me in the past as well. Though I'm running ubuntu linux now as my development server and life has improved considerably. ;-)

Xubuntu Virtual Machine

scottmorgan's picture

Katy: I do my development in a Xubuntu LAMP VMWare virtual machine. You're welcome to a copy of the virtual machine, which is just one big file. It's all set up and running with Drupal 5 and 6. You can still develop with Windows, if that's your preference, and connect to your files through network shares on the virtual machine.

Scott Morgan
www.webzoa.com

Scott Morgan
www.webzoa.com

Vancouver

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: