Microsoft Azure Open Source Development Support Team Blog

Support for Open Source Technologies on Microsoft Azure App Service

Restrict access to login for the WordPress running on Azure web app container

For WordPress sites that running on Apache server in Azure web app for containers, here is sample code to restrict access to login pages, such as wp-login.php or wp-admin 1. FTP to files in /home/site/wwwroot, find the file “.htaccess” (create one if it does not exist) 2. Add the code below to “.htaccess”, replace the… Read more

RewriteRule sample for WordPress in subdirectory

In the case you installed another instance of WordPress in a subdirectory of main WordPress site in Azure web app for Windows, your WordPress installation may be like this,   if use “Post name” Permalink setting, with default web.config, articles in subdirectory might give 404 (not found), for example,   For this problem, you can… Read more

Redirect HTTP to HTTPS from .htaccess for Azure Web App on Linux on Apache

1. To verify the request is sent from HTTP or HTTPS for Web App on Linux: Unlike the application running on Web App on Windows, the server variable “HTTPS” is not defined for Web App on Linux. Check for “X-ARR-SSL”, this variable is set if the request is HTTPS. This information may be verified from Apache server variables,… Read more

Magento Web.Config for Azure and IIS

After installing Magento on Azure, here is the web.config file that should be within the wwwroot folder. <?xml version="1.0" encoding="UTF-8"?>  <configuration>      <system.webServer>          <rewrite>              <rules>                 <!–## rewrite API2 calls to api.php (by now it is REST only)–>                 <rule name="Rewrite API2 calls to api.php" stopProcessing="true">                   <match url="^api/rest" ignoreCase="false" />                   <action… Read more

Converting Apache .htaccess rules to IIS web.config using IIS Manager for Azure Websites

Web.config – the settings and configuration file for a Windows IIS Web Application. .htaccess – the default filename of the directory-level configuration file for a Linux Apache Web Application.   Disclaimer: The URL Rewrite tool by IIS Manager gives you suggested web.config rules. Since it is not a one-to-one conversion, the recommendation is to test… Read more