Geeks With Blogs
Neil Smith [blog]code til ur fingers bleed

I've worked out how to get my linux based Netbeans PHP development machine to behave much like what happens when you create a new ASP.Net project in Visual Studio.

Firstly create multiple PHP project in Netbeans,say for example mysite1 and mysite2. Next edit the apache2/sites-enabled/000-default file and add two virtualhost sections as below


ServerName mysite1.localhost

DocumentRoot /var/www/mysite1/



ServerName mysite2.localhost

DocumentRoot /var/www/mysite2/


For each site you add, pick a different ip address similar to the above where I use the third octet to increment, next edit the etc/hosts file and add the following two lines mysite1.localhost mysite2.localhost

Then in Netbeans, go to File->Project Properties click on 'Run Configuration' and set 'Project Url' to http://mysite1.localhost for the first project and http://mysite2.localhost for the second project.

That will give you a PHP development box which develops multiple PHP projects similar to how a Visual Studio Windows based box handles multiple ASP.Net sites.

Hope this helps someone :)

Posted on Saturday, June 9, 2012 8:49 AM | Back to top

Comments on this post: Linux,Apache,NetBeans,PHP == Windows,IIS/Cassini,Visual Studio,ASP.Net

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Neil Smith | Powered by: