Jump to content

Best way to run different server setups? (Apache / PHP / mySQL)


tibberous

Recommended Posts

I have several sites I work on, all with different versions of PHP, Apache and mySQL. What I would like to do is edit my hosts file so the different url's would go to different addresses.

For example, bobs.com (or maybe a name like _bobs.com, just so it wouldn't conflict with the real [external] domain name) could go to 127.0.0.8 in the hosts file, which would connect to apache 1.3, which would be running PHP 4.2, and know to connect to a certain mySQL service. Other domain names would do the same thing, but with different configurations. Is anything like this possible, because right now it seems all I do is screw around with my server. I happen to be using windows XP - if I have to, I could set up different user accounts for each project, but I am not sure how good that would work either. This is all just for local development, of coarse.
You could run multiple instances of Apache and MySQL each using different config information. For instance, one Apache process could be config'd to run php4 with mysql4 or something like that for as many instances as your hardware could support. Additionally, you could specify what domain each instance would be responsible for. But I am only familiar with Linux. I know it can be done in Linux, Windows might be another story. Maybe google for "running multiple instances of apache in Windows" or something like that. Might get you closer.
You're aware that you can run PHP 4.x and 5.x on the same Apache install, right? And you're aware that you can have multiple Apache "Virtual Hosts" on the same machine, right?

I just want to make sure you're aware of those options before getting in to anything more difficult.


You might want to look VMware and Linux if you're really trying to replicate other envoirments for development purposes.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.