Open eykanal opened 12 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
$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.
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.