Microsoft Azure Open Source Development Support Team Blog

Support for Open Source Technologies on Microsoft Azure App Service

Run PHP Webjob on Azure App Service (Windows)

When you deploy a webjob to run PHP program, there are few items to verify and help to understand the PHP runtime for webjobs. 1. How to create a PHP webjob – Execute a .php file – Create batch to execute .php file – Create shell to execute .php file 2. PHP runtime for webjob is difference… Read more

Setup SMTP in Drupal 8 on Azure Webapp

Example of setup SMTP in Drupal 8 using O365 SMTP server for the Drupal8 site hosted on Azure Webapp: 1.Download smtp module 8.x-1.x-dev from 2.Extract “smtp-8.x-1.x-dev” and copy “smtp” folder to “D:\home\site\wwwroot\modules” 3.Login as Drupal admin, find Extend -> MAIL->SMTP Authentication Support, check it and click install 4.Configure SMTP module, find Configuration -> SYSTEM ->… Read more

Debugging Java containers

Can you debug Java applications within your container? Yes. How? Check below… 1. Modify your dockerfile To expose JPDA params                  ENV JPDA_OPTS=”-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n” To expose the debug port along with application port                  EXPOSE 7080 8000 To add the options in your command                CMD [“sh”, “-c”, “java $JPDA_OPTS -Durl=$url -jar app.jar”] 2. Build the… Read more

Use JpGraph library with Azure Web App

JpGraph is a graph creating library for PHP5 and PHP7.0. The library is completely written in PHP and ready to be used in any PHP app. Here is a demo how to use it with web app on azure App Services. 1. Download JpGraph PHP5 and PHP7 version from (Pro. version require license) 2. After downloading… Read more

Profile Python Applications in Azure App Services

Slow application performance issues tend to be challenging to troubleshoot regardless of the platform in which your application is running. This is due in great part to the sometimes random nature of these issues. These types of issues also often do not result in a specific error being logged. If you think your Python application… Read more

Running Flask App with HttpPlatformHandler in Azure App Services(Windows)

Flask is a micro web framework written in Python and based on the Werkzeug toolkit and Jinja2 template engine. Below are list of steps we would follow Create Sample Project Create Azure WebApp and Use Site Extension to Upgrade Python Create and Change Deployment script Adding web.config (for production app with waitress) Publish App You… Read more

Django app with HttpPlatformHandler in Azure App Services (Windows)

In my previous blog Deploying Django App to Azure App Services using Git, I have provided detailed steps on how to run Django app in Azure App services using wfastcgi provides a bridge between IIS and Python using WSGI and FastCGI, similar to what mod_python provides for Apache HTTP Server. Even though using wfastcgi… Read more

Nodejs App Performance Tweaks – Azure App Services (Windows)

Node.js is a JavaScript runtime built on Chrome’s V8 JavaScript engine. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient. At some point of your application lifecycle you might end-up with performance issue in any web application. This blog would help you fix such issue on nodejs app hosted in Azure… Read more

Enable PHP extensions on Azure Web App on Windows

For the case your web app is hosted on Azure App Service on Windows, if the PHP extensions are not available, you need to install or enable them. Some PHP extensions that are available in default PHP but not enabled, such as php_gmp, php_ldap, php_sockets,  etc. You can verify this from Kudu. If you use… Read more

HTTP to HTTPS redirect for WordPress on Azure Web App on Linux

If you host WordPress site on Azure Web App on Linux running Apache, here are the steps to implement HTTP to HTTPS redirect: 1. Add RewriteRule in .htaccess in WordPress application root RewriteCond %{HTTP:X-ARR-SSL} ^$ RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] 2. Once this RewriteRule is added, you may see wp-admin page lost style like this, this… Read more