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.
Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.