virtualhost / virtualhost.sh

A script for Mac OS X to create virtual hosts under Apache
http://patrickgibson.com/utilities/virtualhost/
441 stars 98 forks source link

Lion compatibility: no Sites folder by default #8

Open eykanal opened 12 years ago

eykanal commented 12 years ago

The script assumes that the Sites folder exists, which is no longer a safe assumption in Lion; in 10.7, it only is there if the user turns on the "web sharing" option in the Sharing section of the System Preferences. I didn't check to see whether there were any other lion incompatibilities.

sashareds commented 11 years ago

Perhaps I am wrong.. but seems this script is not optimised for Lion/Mountain Lion at all.. It looks for virtualhosts into $APACHE_CONFIG/virtualhosts, when it should be $APACHE_CONFIG/extra/ or $APACHE_CONFIG/extra/httpd-vhosts.conf

star-szr commented 9 years ago

$APACHE_CONFIG/virtualhosts is created by this script and included from httpd.conf. This allows for the structure of having one file per virtualhost and makes things like virtualhost.sh --list and virtualhost.sh --delete much more straightforward behind the scenes.

At a glance it does look like we might want to add some error handling if $DOC_ROOT_PREFIX (defaults to the Sites folder) doesn't exist.