Skip to content
pgib edited this page Dec 8, 2010 · 4 revisions

virtualhost.sh allows for some basic configuration within the script; however, if you edit the variables within the script itself, you will lose these settings any time you upgrade the script.

To get around this limitation, put all of your settings in ~/.virtualhost.sh.conf

The following variables can be set:

# If you are using this script on a production machine with a static IP address,
# and you wish to setup a "live" virtualhost, you can change the following IP
# address to the IP address of your machine.
#
IP_ADDRESS="127.0.0.1"

# By default, this script places files in /Users/[you]/Sites. If you would like
# to change this, like to how Apple does things by default, uncomment the
# following line:
#
#DOC_ROOT_PREFIX="/Library/WebServer/Documents"

# Configure the apache-related paths
#
APACHE_CONFIG="/private/etc/apache2"
APACHECTL="/usr/sbin/apachectl"

# If you wish to change the default application that gets launched after the
# virtual host is created, define it here:
#OPEN_COMMAND="/usr/bin/open -a /Applications/Firefox.app"
#OPEN_COMMAND="/usr/bin/open -a /Applications/WebKit.app"
OPEN_COMMAND="/usr/bin/open"

# If defined, a ServerAlias os $1.$WILDCARD_ZONE will be added to the virtual
# host file. This is useful if you, for example, have setup a wildcard domain
# either on your own DNS server or using a server like dyndns.org. For example,
# if my local IP of 10.0.42.42 is static (which can still be achieved using a
# well-configured DHCP server or an Apple Airport Extreme 802.11n base station)
# and I create a host on dyndns.org of patrickdev.dyndns.org with wildcard
# hostnames turned on, then defining my WILDCARD_ZONE to "patrickdev.dyndns.org"
# will enable access to my virtual host from any machine on the network. Note
# that this would also work with a public IP too, and the virtual hosts on your
# machine would be accessible to anyone on the internets.
#WILDCARD_ZONE="my.wildcard.host.address"

# A feature to specify a custom log location within your site's document root
# was requested, and so you will be prompted about this when you create a new
# virtual host. If you do not want to be prompted, set the following to "no":
PROMPT_FOR_LOGS="no"

# If you do not want to be prompted, but you do always want to have the site-
# specific logs folder, set PROMPT_FOR_LOGS="no" and enable this:
ALWAYS_CREATE_LOGS="yes"

# If you have an atypical setup, and you don't need or want entries in your
# /etc/hosts file, you can set the following option to "yes".
SKIP_ETC_HOSTS="no"

# If you are running this script on a platform other than Mac OS X, your home
# partition is going to be different. If so, change it here.
HOME_PARTITION="/Users"

# If your environment has a different default DocumentRoot, and you don't want
# to be nagged about "fixing" your DocumentRoot, set this to "yes".
SKIP_DOCUMENT_ROOT_CHECK="no"
Clone this wiki locally