My PHP Development Environment

I was having problems with XAMPP, I made the huge mistake of installing WebMatrix to try it out, it used my port 80, installed a bunch of crap and wouldn't let me uninstall anything, sure, I can uninstall WebMatrix but not all the programs Web Installer installed.

So I decided to move my development server from my development PC, to my notebook, I set up a virtual machine with Virtual Box, and installed Windows Server 2003 (I was going to install 2008 but I couldn't find the CD, 2003 is good enough though!), I gave it one core of my i3 processor and 512 RAM, and to my surprise, it ran very smoothly, I installed IIS6, .NET 4, IIRF, PHP using FastCGI, MySQL, xDebug and Mongo, also I installed the updates. IIS might not be liked by many, but it's a pretty efficient little webserver! (Note: That benchmark uses IIS 7!)

After I installed everything I set up the network, I gave the virtual server a static ip "192.168.0.110", and using my router's port forwarding I forwarded the ports 80 (for HTTP) and 21 (for FTP), I also forwarded two other ports, 3389 for Remote Desktop and 2082 for PhpMyAdmin (I didn't forward the MySQL nor Mongo ports, they will be used by scripts using localhost).

Then, I set up a no-ip account and using my router's configuration page I synchronized my public dynamic ip with a no-ip domain, so I can use a static ip for my development sever, and remote desktop connections.

Finally I added a Network Location on My Pc, so I could go to W:\www to access IIS's public folder, and I just develop using Sublime Text 2 on that folder!

When I'm not on my LAN, I use Sublime Text 2's FTPSync awesome package to automatically Sync my folder with my FTP! So I can develop at work, then go home, and keep working on the same exact files.

And I can use Remote Desktop to manage my little server everywhere, at LAN or over the internet using my static no-ip.

It's way easier than anything I've tried before, and it's quite nice! I really enjoy my new setup, and the best part is I can mount the VM on other machine, and migrating my server is pretty easy.

Fun!

0 comments:

Post a Comment