News Feed
Jobs Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Konstantin Kudryashov:
Autohosts for Symfony projects on Mac
October 18, 2012 @ 10:39:43

Konstantin Kudryashov has posted a helpful hint for any web developer out there that knows the pain of constantly setting up VirtualHosts and local hostnames during their development. His suggestion makes setting them up simple using Apache2's "autohosts" support.

We all know, that web development is not as easy as it sounds and that it involves lot of different and sometimes really complex tools to just run or test stuff. We also know, that bootstrap (setup) of the project could take more time than you want it to. It's not a big deal if you're working on single project full time, but at KnpLabs, i'm bootstraping new sf2 project every 2 weeks. So this manual crafting of virtual host, edition of /etc/hosts and maintaining of those temp hosts everywhere made me really sick. So, at some point i've started to look for an elegant solution. Here is it.

He gives you all the commands, file contents and software you'll need to install (he uses Homebrew) to install dnsmasq and get it configured. The only Symfony-specific part of the process is the last step - getting the latest version of the framework and installing it.

0 comments voice your opinion now!
autohost apache2 configuration virtualhost localhost automate


Joshua Thijssen's Blog:
Setting up a development environment
February 06, 2012 @ 09:27:41

In a new post to his blog Joshua Thijssen gives a guide to how he usually sets up his development environments when working in PHP. It includes working with virtual machines, configuring DNS and setting up his tools to work with it all.

Doing development on multiple projects can be a burden from time to time. One project would be running on PHP 5.3, while another still needs 5.1. Sometimes you need a MySQL server, while on other occasions, you need a NoSQL solution like couchDB or MongoDB together with all kind of gearman functionality. This article shows you how I've setup such a development platform that allows you to quickly create new projects, and still maintain flexibility when you need it.

He uses VirtualBox with either a Debian or CentOS installation as a base platform. He uses Vagrant to set up and configure the machines to make setup almost automatic. He still has to go in and configure a few things like the VirtualHost and DNS settings for the site/application he's working on. Next up is setting up the tools he uses, specifically XDebug and setting up his editor of choice (PHPStorm) for remote debugging.

0 comments voice your opinion now!
development environment virtualbox debian centos mysql vagrant xdebug phpstorm dns virtualhost


Millwood Online Blog:
Multi-site Drupal installations
November 06, 2009 @ 11:37:39

On the Millwood Online blog there's a quick step-by-step about getting multiple Drupal sites up and running on one code installation.

One of the great things about Drupal is that you can run more that one site off one installation. This saves disk space and load on your server, it also saves maintenance time. With only one installation to manage and update the time spent administering your site drops greatly.

The process is pretty simple - install Drupal normally and set it up for the main domain, then change the directory name for the settings and add another for the new domain name. Go update your Apache virtual host configuration file to point to the new location and restart the web server. Both of your domains should be set and ready.

1 comment voice your opinion now!
druapl multiple website virtualhost apache


SitePoint Web Tech Blog:
How to Test Multiple Websites on One PC With Apache Virtual Hosts
April 24, 2009 @ 10:24:31

On the SitePoint.com Web Tech blog, Craig Buckler explains how you can test multiple PHP/MySQL/Apache websites on your local machine without having to change your Apache configuration each time - the magic of VirtualHosts.

It is rare to find a web developer with responsibility for just one website. In this article, we will configure your development PC so you can test any number of websites using a dedicated domain name for each one. You will require a local installation of Apache 2.2 and, optionally, PHP and MySQL.

He explains the only two parts you'll need to get it up and running - changes to your hosts file and updates to the Apache configuration file to add in VirtualHost records for each site. He also throws in a bonus tip about detecting which host the script is being used on via the $_SERVER['HTTP_HOST'] variable.

0 comments voice your opinion now!
multiple website apache virtualhost tutorial host file configure


Dave Dash's Blog:
symfony and the .htaccess file
August 16, 2007 @ 15:14:00

Dave Dash has another performance tip for Symfony users involving a simple change involving your .htaccess file.

One performance boost that can be garnered from a symfony app (or any app for that matter) is disabling .htaccess. .htaccess does not need to be parsed on each visit to your app. Disabling .htaccess is trivial in your VirtualHost or another relevant part of your apache configuration place.

The information (like routing rules) that was inside of the .htaccess is then moved back into the VirtualHost inside the Apache configuration to make for less files the Apache instance needs to open to get its job done.

0 comments voice your opinion now!
symfony framework htaccess file virtualhost symfony framework htaccess file virtualhost


Tim Bromhead's Blog:
Super friendly URLs - handling spaces with URL Rewrites and PHP
February 20, 2007 @ 13:35:00

In a new entry today, Tim Bromhead shares his method for creating "super friendly urls" for a site's users using mod_rewrite:

Today we are going to show how to make the URLs with spaces super easy to type for users. bla.st uses dashes in the URLs to represent spaces eg. http//bla.st/web-design/. We chose dashes over underscores because underscores can get lost with underlined links, and we think they look nicer.

He includes the Apache config information for working with the VirtualHost entry and the simple PHP script to handle the requests. It looks in the SERVER superglobal, at the QUERY_STRING to see what the user is requesting and does an append and redirect accordingly. This example is made to take any form of a space in the URL (including underscores and %20), parse it out, and pass the user along correctly to the page they want.

20 comments voice your opinion now!
friendly url space virtualhost apache modrewrite friendly url space virtualhost apache modrewrite



Community Events











Don't see your event here?
Let us know!


component symfony2 series introduction composer language hack podcast performance database install unittest application opinion release facebook security framework hhvm package

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework