if add urlmapping in provision tab,following variable will be available in your scripts.
BASE_URL_SCHEME – URL scheme. Allowed values: http , https
BASE_URL_HOST – URL host.
BASE_URL_PORT – URL port (may be omitted if default port for protocol is used: 80 for http, 443 for https).
BASE_URL_PATH – URL path including trailing slash.
note:this variables will be available in configuration script.