Windows Azure Web Sites Cheat Sheet

A quick reference for working with Windows Azure Web Sites.

Welcome

Welcome to Windows Azure Web Sites Cheat Sheet — a quick reference for working with Windows Azure Web Sites. If you are looking for tutorials on Windows Azure Web Sites view the Windows Azure homepage

Back to Top

Windows Azure CLI Tools (Cross-Platform)

The Windows Azure CLI Tools (Cross-Platform) are available on Linux, Mac and Windows. The tools are implemented with Node.js, download the appropriate installer for your operating system.

Back to Top

Windows Azure Web Sites - Commands

This section outlines the Windows Azure Web Sites support in the Windows Azure Command Line (Cross-Platform) tools.

General Commands

waws-dev$ azure site
command options description
browse [options] [name]
-s, --subscription <id>
execute command against the provided subscription
launch the website [name] in the default browser
list [options]
-s, --subscription <id>
execute command against the provided subscription
list all of the provisioned websites
create [options] [name]
-h, --help
show usage information
-s, --subscription <id>
execute command against the provided subscription
-l, --location <location>
the geographic region to create the website
--hostname
custom hostname to associate to the web site
--git
configure git on web site and local folder
-pu, --publishingUsername
the publishing username for git
--github
configure github on web site and local folder
--githubusername <username>
the github username
--githubpassword <password>
the github password
--githubrepository
the full name (eg. username/repository) of the github repository
-v, --verbose
use verbose output
--json
use json output
create a new, or associate a local directory to an existing web site
delete [options] [name]
-h, --help
show usage information
-s, --subscription <id>
execute command against the provided subscription
-q, --quite
quite mode, do not ask for confirmation
-v, --verbose
use verbose output
--json
use json output
delete the web site [name]
start [options] [name]
-h, --help
show usage information
-s, --subscription <id>
execute command against the provided subscription
-v, --verbose
use verbose output
--json
use json output
start the Internet Information Services (IIS) site
stop [options] [name]
-h, --help
show usage information
-s, --subscription <id>
execute command against the provided subscription
-v, --verbose
use verbose output
--json
use json output
stop the Internet Information Services (IIS) site
restart [options] [name]
-h, --help
show usage information
-s, --subscription <id>
execute command against the provided subscription
-v, --verbose
use verbose output
--json
use json output
stop, then start the Internet Information Services (IIS) site

Back to Top

Deployment Commands

waws-dev$ azure site deployment
command options description
list [options] [name]
-h, --help
show usage information
-s, --subscription <id>
execute command against the provided subscription
-m, -max <count>
limit the maximum number of results
-v, --verbose
use verbose output
--json
use json output
lists deployed site
show <commitId> [name]
-h, --help
show usage information
-s, --subscription <id>
execute command against the provided subscription
-d, --details
display log details
-v, --verbose
use verbose output
--json
use json output
shows details of the git deployment with the particular [commitid]
redeploy <commitId> [name]
-h, --help
show usage information
-s, --subscription <id>
execute command against the provided subscription
-q, --quite
quite mode, do not ask for confirmation
-v, --verbose
use verbose output
--json
use json output
set specified [commitid] as the active deployment
github [options] [name]
-h, --help
show usage information
-s, --subscription <id>
execute command against the provided subscription
--githubusername <username>
the github username
--githubpassword <password>
the github password
--githubrepository
the full name (eg. username/repository) of the github repository
-v, --verbose
use verbose output
--json
use json output
setup a github service hook for specified web site

Back to Top

Log Commands

waws-dev$ azure site log
command options description
download [options] [name]
-h, --help
show usage information
-s, --subscription <id>
execute command against the provided subscription
-o, --output <path>
output path, default is current (local) folder
-v, --verbose
use verbose output
--json
use json output
requires Logging to be enabled in web site
download IIS Log information from the specified web site

Back to Top

Repository Commands

waws-dev$ azure site repository
command options description
branch <branch> [name] [options]
-h, --help
show usage information
-s, --subscription <id>
execute command against the provided subscription
-v, --verbose
use verbose output
--json
use json output
set the branch in which to use for website deployment
delete [name] [options]
-h, --help
show usage information
-s, --subscription <id>
execute command against the provided subscription
-q, --quite
quite mode, do not ask for confirmation
-v, --verbose
use verbose output
--json
use json output
delete the remote git repository for the web site

Back to Top

Location Commands

waws-dev$ azure site location
command options description
list [options]
-h, --help
show usage information
-v, --verbose
use verbose output
--json
use json output
enumerate the data centers in which web sites can be created

Back to Top

Configuration Commands

waws-dev$ azure site config
command options description
list [options] [name]
-h, --help
show usage information
-s, --subscription <id>
execute command against the provided subscription
-v, --verbose
use verbose output
--json
use json output
list the app setting for the specified site
add [options] <keyvaluepair> [name]
-h, --help
show usage information
-s, --subscription <id>
execute command against the provided subscription
-v, --verbose
use verbose output
--json
use json output
add an app setting to the specified web site
clear [options] <key> [name]
-h, --help
show usage information
-s, --subscription <id>
execute command against the provided subscription
-v, --verbose
use verbose output
--json
use json output
removes an app setting from the specified web site
get [options] <key> [name]
-h, --help
show usage information
-s, --subscription <id>
execute command against the provided subscription
-v, --verbose
use verbose output
--json
use json output
gets the current value of web site app setting

Back to Top

Language/Framework Specific Site Configuration

PHP

PHP Version

Default Configurations of PHP on Windows Azure Web Sites
PHP Version PHP Runtime WinCache
5.3 5.3.13 1.3
5.4 5.4.0 1.3
Bring your own Runtime

Windows Azure Web Sites HTTP Handlers require Non-Thread Safe builds on PHP which can be downloaded from windows.php.net

HTTP Handler Mapping
Extension Script Processor Path Additional Arguments (Optional)
*.php D:\home\sites\bin\php-runtime\php-cgi.exe
* D:\home\sites\bin\php-runtime\php-cgi.exe

AppSettings

PHP Specific Configuration AppSettings
Key Value Description
PHP_EXTENSIONS
comma delimited list of paths to dynamic link libraries
bin\ext\php_mongo.dll,bin\ext\php_xdebug.dll
used for loading PHP extensions with the built in versions of PHP
PHP_ZENDEXTENSIONS
comma delimited list of paths to dynamic link libraries
bin\ext\php_xdebug.dll
used for loading zend extensions with the built in versions of PHP

Currently AppSettings can only able extensions available in wwwroot.

Back to Top

Fork me on GitHub