How to Configure Websites
In the Azure Management Portal you can change the configuration options for websites and you can link website to other Azure resources. For example, you can link websites to a SQL Database to provide additional functionality. You can also configure websites to use a new or existing MySQL database.
Table of Contents
How to: Change configuration options for a website
Follow these steps to change configuration options for a website.
- In the Management Portal, open the website's management pages.
- Click the Configure tab to open the Configure management page.
- Set the following configuration options for the website as appropriate:
- .NET Framework Version - If your web application uses the .NET Framework, set the version of the framework that the web application requires.
- PHP Version - If your web application uses PHP, set the version of PHP that the web application requires.
- Java Version - Select the displayed version of Java to enable it for your web application, or OFF to disable Java. If you enable Java for your web application, the Web Container option lets you choose between Tomcat and Jetty versions.
Note: For technical reasons, enabling Java for your website disables the .NET, PHP, and Python options.
- Python Version - Select the Python version you want to use, or set it to Off, which is the default.
- Managed Pipeline Mode - Of the two choices, Classic and Integrated, Integrated is the default. You should use the Classic option only if you have legacy websites that run exclusively on older versions of IIS.
- Platform - For sites in Standard mode, you can choose whether you want your application to run in a 32-bit or 64-bit environment. Sites in the Free and Shared modes always run in a 32-bit environment.
- Web Sockets - Choose On to enable your website to use real time request pattern applications such as chat.
- Always On - By default, websites are unloaded if they have been idle for some period of time. This lets the system conserve resources. You can enable the Always On setting for a site in Standard mode if the site needs to be loaded all the time. Because continuous web jobs may not run reliably if Always On is disabled, you should enable Always On when you have continuous web jobs running on the site.
- Edit in Visual Studio Online - Select On to enable live code editing with Visual Studio Online. After you save this configuration change, the DASHBOARD tab's Quick Glance section will display a link called Edit in Visual Studio Online. Click the link to edit your website directly online. If you need to authenticate, you can use your basic deployment credentials.
Note: If you have 'deployment from source control' enabled, it is possible for a deployment to overwrite changes the changes you make in the Visual Studio Online editor. It is therefore best not to use 'deployment from source control' if you want to edit the site contents directly with Visual Studio Online.
- certificates - In Standard mode only, you can click upload to upload an SSL certificate for a custom domain. The certificates you upload are listed here. Wildcard ("star") certificates (certificates with an asterisk) are supported. After you upload a certificate, you can assign it to any website in your subscription and region. A star certificate only has to be uploaded once, but can be used for any site within the domain for which it is valid. A certificate can be deleted only if no bindings in any site are active for the given certificate.
Note: Custom domains are available only in Shared and Standard modes, and SSL support for custom domains is available in Standard mode only. For information about configuring SSL for a custom domain on Azure, see Enable HTTPS for an Azure website.
- domain names - View or add additional domain names for the website here. You can add custom domains by clicking Manage Domains. Custom domains are available only in Shared and Standard modes. You can change the website mode on the Scale management page. Custom domains are not available in Free mode. For more information on configuring custom domains, see Configuring a custom domain name for an Azure website.
- SSL Bindings - SSL bindings to custom domains are available only in Standard mode. Choose an SSL mode (SNI, IP, or No SSL) for a particular domain name. If you choose SNI or IP, you can specify a certificate for the domain from the certificates you have uploaded. For information about configuring SSL for a custom domain on Azure, see Enable HTTPS for an Azure website. For more information about SNI, see Server Name Indication.
- deployments - Use these settings to configure deployments.
- Git URL - If you have created a Git repository on your Azure website, this is its URL - the location to which you push your content.
- Deployment Trigger URL - This URL can be set on a GitHub, CodePlex, Bitbucket, or other repository to trigger the deployment when a commit is pushed to the repository.
- Branch to Deploy - This lets you specify the branch that will be deployed when you push content to it.
- application diagnostics - Set options for gathering diagnostic traces from a web application whose code has been instrumented with traces. The logging options for application diagnostics include:
- Application Logging (File System) - Choose On to have the application logs written to the website's file system. When enabled, file system logging lasts for a period of 12 hours. You can access the logs from the FTP share for the website. The link to the FTP share can be found on the Dashboard. Under Quick Glance, choose FTP Diagnostic Logs or FTPS Diagnostic Logs.
- Application Logging (Storage) - Choose On to have your application logs written to an Azure storage account. Logging to a storage account has no time limit and stays enabled until you disable it. By default, the logs are stored in a table called WAWSAppLogTable.
- Logging Level - When logging is enabled, this option specifies the amount of information that will be recorded (Error, Warning, Information, or Verbose).
- Diagnostic Storage - Clicking Manage Connection opens the Manage diagnostic storage dialog with the following options for saving logs to your Azure storage account:
- Storage Account Name - Choose the storage account to which you would like to have the logs saved.
- Storage Access Key - Displays the key for the chosen storage account. If you have regenerated the key for the storage account, type the new key here manually, or use one of the Synchronize buttons. The synchronize buttons are available only if the currently logged on user has access to the selected storage account.
- Synchronize Primary Key - Retrieves the latest primary key of your Azure Storage account.
- Synchronize Secondary Key - Retrieves the latest secondary key of your Azure Storage account.
Note: For more information about Azure Storage Access Keys, see How to: View, copy, and regenerate storage access keys.
- site diagnostics - Set options for gathering diagnostic information for your website, including:
- Web Server Logging - Specify whether to enable web server logging for the website. Web server logs are saved in the W3C extended log file format. You can save the logs to Azure Storage or to the File System.
Tip: The maximum size of log storage in the file system is 100 megabytes. If you need to retain more history than that, use Azure Storage, which has a much greater storage capacity.
- To save web server logs to an Azure Storage Account, choose Storage, and then choose manage storage. In the Manage Storage for Site Diagnostics dialog box, use the Storage Account option to choose the Azure Storage Account for the container that will hold the logs. Use the Azure Blob Container option to choose the container that will hold the logs, or select Create a new blob container to enable the Blob Name box where you can specify a name for the new container.
Note: If you do not yet have a storage account, go to the Storage section of the Azure portal where you can click New to create an account.
- If you choose File System, the logs are saved to the FTP site listed under FTP Diagnostic Logs on the Dashboard management page. Enabling File System storage also enables the Quota box where you can set the maximum amount of disk space for the log files. The minimum is 25MB and the maximum is 100MB. The default is 35MB. When the quota is reached, the oldest files are successively overwritten by the newest ones.
- By default, web server logs in an Azure Storage Account are never deleted. To specify a period of time after which the logs will be automatically deleted, select Set Retention and enter the number of days to keep the logs in the Retention Period box. You can also use the Set Retention option for File System storage.
- Detailed Error Messages - Specify whether to log detailed error messages for the website. If enabled, detailed error messages are saved as .htm files to the FTP site listed under FTP Diagnostic Logs on the Dashboard management page. After connecting to the specified FTP site navigate to /LogFiles/DetailedErrors/ to retrieve the .htm files which contain detailed error messages.
- Failed Request Tracing - Specify whether to enable failed request tracing. If enabled, failed request tracing output is written to XML files and saved to the FTP site listed under FTP Diagnostic Logs on the Dashboard management page. After connecting to the specified FTP site navigate to /LogFiles/W3SVC######### (where ######### represent a unique identifier for the website) to retrieve the XML files that contain the failed request tracing output.
The /LogFiles/W3SVC#########/ folder contains an XSL file and one or more XML files. Ensure that you download the XSL file into the same directory as the XML file(s) because the XSL file provides functionality for formatting and filtering the contents of the XML file(s) when viewed in Internet Explorer.
- Remote Debugging - Set this option to On to enable remote debugging in your choice of Visual Studio 2012 or Visual Studio 2013. When enabled, you can use the remote debugger in Visual Studio to connect directly to your Azure website.
Note: Remote debugging will be enabled only for 48 hours and will not work with a site name or user name that is longer than 20 characters.
- monitoring - For websites in Standard mode, test the availability of HTTP or HTTPS endpoints. You can test an endpoint from up to three geo-distributed locations. A monitoring test fails if the HTTP response code is greater than or equal to 400 or if the response takes more than 30 seconds. An endpoint is considered available if its monitoring tests succeed from all the specified locations.
- developer analytics - Choose Add-on to select an analytics add-on from a list, or to go to the Azure store to choose one. Choose Custom to select an analytics provider such as New Relic from a list. If you use a custom provider, you must enter the license key in the Provider Key box.
Note: For more information on using New Relic with Azure Websites, see New Relic Application Performance Management on Azure Websites.
- app settings - Specify name/value pairs that will be loaded by your web application on start up. For .NET sites, these settings will be injected into your .NET configuration AppSettings at runtime, overriding existing settings. PHP, Python, Java and Node applications can access these settings as environment variables at runtime. For each app setting two environment variables are created; one with the name specified by the app setting entry, and another with a prefix of APPSETTING_. Both will contain the same value.
- connection strings - View connection strings for linked resources. For .NET sites, these connection strings will be injected into your .NET configuration connectionStrings settings at runtime, overriding existing entries where the key equals the linked database name. For PHP, Python, Java and Node applications, these settings will be available as environment variables at runtime, prefixed with the connection type. The environment variable prefixes are as follows:
For example, if a MySql connection string were named connectionstring1, it would be accessed through the environment variable
- SQL Server: SQLCONNSTR_
- MySQL: MYSQLCONNSTR_
- SQL Database: SQLAZURECONNSTR_
- Custom: CUSTOMCONNSTR_
Note: Connection strings are also created when you link a database resource to a website. Connection strings created this way are read only when viewed on the configuration management page.
- default documents - Add your website's default document to this list if it is not already in the list. A website's default document is the web page that is displayed when a user navigates to a website and does not specify a particular page on the website. So given the website http://contoso.com, if the default document is set to default.htm, a user would be routed to http://www.contoso.com/default.htm when pointing their browser to http://www.contoso.com. If your website contains more than one of the files in the list, then make sure your website's default document is at the top of the list by changing the order of the files in the list.
- handler mappings - Add custom script processors to handle requests for specific file extensions. Specify the file extension to be handled in the Extension box (for example, *.php or handler.fcgi). Requests to files that match this pattern will be processed by the script processor specified in the Script Processor Path box. An absolute path is required for the script processor (the path D:\home\site\wwwroot can be used to refer to your site's root directory). Optional command-line arguments for the script processor may be specified in the Additional Arguments (Optional) box.
- virtual applications and directories - To configure virtual applications and directories associated with your website, specify each virtual directory and its corresponding physical path relative to the site root. Optionally, you can select the Application checkbox to mark a virtual directory as an application in site configuration.
- Click Save at the bottom of the Configure management page to save configuration changes.
How to: Configure a website to use a SQL database
Follow these steps to link a website to a SQL Database:
In the Management Portal, select Websites to display the list of websites created by the currently logged on account.
Select a website from the list of websites to open the website's Management pages.
Click the Linked Resources tab and a message will be displayed on the Linked Resources page indicating You have no linked resources.
Click Link a Resource to open the Link a Resource wizard.
Click Create a new resource to display a list of resources types that can be linked to your website.
Click SQL Database to display the Link Database wizard.
Complete required fields on pages 3 and 4 of the Link Database wizard and then click the Finish checkmark on page 4.
Azure will create a SQL database with the specified parameters and link the database to the website.
How to: Configure a website to use a MySQL database
To configure a website to use a MySQL database, follow the same steps to use a SQL database, but in the Link a Resource wizard, choose MySQL Database instead of SQL Database.
Alternatively, you can create the website with the Custom Create option. In the Database dropdown, choose either Create a new MySQL database or Use an existing MySQL database.
How to: Configure a custom domain name
For information about configuring your website to use a custom domain name, see Configuring a custom domain name for an Azure Web Site.
How to: Configure a website to use SSL
For information about configuring SSL for a custom domain on Azure, see Enable HTTPS for an Azure web site.