virtual hosts for your new project.

Posted: 03/02/2011 in Uncategorized

Open the configuration  file with the following command and add the following configuration at the end:

sudo vim /etc/apache2/sites-enabled/000-default

<VirtualHost 127.0.1.1:80>
DocumentRoot “project_root_directory_path
DirectoryIndex index.php
<Directory “project_root_directory_path“>
AllowOverride All
Allow from All
</Directory>
</VirtualHost>

The domain name www.yourprojectname.com.localhost used in the Apache configuration has to be declared locally. Open the configuration file with the following command and add the following configuration at the end:

sudo vim /etc/hosts

127.0.1.1   www.yourprojectname.com

Now enjoy the configured a dedicated domain name instead of tying a new url each time you start a new project.
(Above configurations are tested in Ubuntu 10.10)

🙂

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s