Quantcast
Viewing all articles
Browse latest Browse all 10

[HOW-TO] Setup virtualhost for apache on MAC OSX Lion

It took me sometime to figure out setting up virtualhost for apache2 on Mac OSX Lion 10.7.4. I hope the following steps will be helpful.

  1. This is important, Edit httpd.conf located at /private/etc/apache2/httpd.conf. Uncomment the line

    Include /private/etc/apache2/extra/httpd-vhosts.conf

  2. I like to have separate files for each vhost entries. There add the following line at the end of httpd.conf

    Include /etc/apache2/sites/*.conf

  3. Now you can make new entries for any number of virtualhost you would want. Just name a file with extension conf  inside /private/etc/apache2/sites/ directory and those files will be included.

Viewing all articles
Browse latest Browse all 10

Trending Articles