Mautic Community Forums

Installing Mautic on Azure Websites

Hi,



This is a quick install guide for Azure Websites. The purpose is make it grow within this thread. I will appreciate any contribution to it.



Install steps:


  1. Log in to Azure Portal with your account (you must have a Credit Card associated, won’t work with Open Subscriptions)
  2. Create a ClearDB MySQL Database. I selected the Venus Plan (10$/month). Log in and note down the connection data (server, user and password).
  3. Create a Web App, and note down the FTP connection parameters. For example, let’s say we have created http://mautic.azurewebsites.net
  4. Download Mautic and unzip it
  5. Upload via FTP the Mautic files
  6. Browse the website (http://mautic.azurewebsites.net). Follow the wizard. Provide the ClearDB connection data when required. Let the wizard run.



    At this point you should be running Mautic on Azure Websites. However if you try to browse the URL http://mautic.azurewebsites.net it won’t work unless you add /index.php at the end. To overcome this problem create a web.config file with the contents below (IIS Rewrite Rules and mime types) and upload it to the root folder where you uploaded Mautic:


<?xml version="1.0" encoding="utf-8" ?>



<system.web>



</system.web>

<system.webServer>



































</system.webServer>





There is still an issue to solve: the performance is not good, I suppose because of the connection with ClearDB. I keep investigating, if anyone discover the solution I will appreciate if he/she can post it.


Hi,

This is a quick install guide for Azure Websites. The purpose is make it grow within this thread. I will appreciate any contribution to it.

Install steps:

  1. Log in to Azure Portal with your account (you must have a Credit Card associated, won’t work with Open Subscriptions)
  2. Create a ClearDB MySQL Database. I selected the Venus Plan (10$/month). Log in and note down the connection data (server, user and password).
  3. Create a Web App, and note down the FTP connection parameters. For example, let’s say we have created http://mautic.azurewebsites.net
  4. Download Mautic and unzip it
  5. Upload via FTP the Mautic files
  6. Browse the website (http://mautic.azurewebsites.net). Follow the wizard. Provide the ClearDB connection data when required. Let the wizard run.

At this point you should be running Mautic on Azure Websites. However if you try to browse the URL http://mautic.azurewebsites.net it won’t work unless you add /index.php at the end. To overcome this problem create a web.config file with the contents below (IIS Rewrite Rules and mime types) and upload it to the root folder where you uploaded Mautic:

<?xml version="1.0" encoding="utf-8" ?>

There is still an issue to solve: the performance is not good, I suppose because of the connection with ClearDB. I keep investigating, if anyone discover the solution I will appreciate if he/she can post it.

In the next days I will install Mautic using a mysql db from a dedicated VM, and I will post here the conclusion. On another hand, for Web App you use the shared plan or a dedicated one?

Actually there’s a problem, i don’t know if it’s only on the latest build but you only work with URLs that have 2 blocks line /s/dashboard but the system also work on 3 and 4 blocks URLS like /s/leads/new and /s/leads/edit/1 and your rules will fail on these situations.

I have created a little hack to work this around that is create the same rule with 1, 2, 3 and 4 blocks like this one: ^([_0-9a-zA-Z-]+)/([_0-9a-zA-Z-]+)/([_0-9a-zA-Z-]+)$.

As i said this is a hacky solution and as far as i know Regex does allow the configuration of repeating blocks so it would only be necessary to create one rule to get all blocks but i’m no expert on it.

Also in my case it was necessary to add a file verification to remove the file routing through these rules:

<rule name="Rewrite to index.php 2"> <match url="^([_0-9a-zA-Z-]+)?(/[_0-9a-zA-Z-]+)?$" ></match> <conditions> <add input="{URL}" negate="true" pattern="index.php(.*)" ></add> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" ></add> </conditions> <action type="Rewrite" url="index.php/{R:1}/{R:2}" ></action> </rule>

This solution works also on hosts outside Azure, it will work on anything that has a web.config.