Hosting Unity WebGL games on Azure

Sign in to queue

The Discussion

  • User profile image
    batpox

    The link to the web.config file is broken.

  • User profile image
    batpox

    Below is what I used for my web.config using an azure website.

    Note 1: it is similar to what Mickey said he would provide, but I added mime entries for .json, and .unityweb, which my application used. Check your files on your "Build" folder to see if you need others! :)

    Note 2: The <? xml header line, which is shown as the first line by some sites, was not necessary.

    <configuration>
    <system.webServer>
    <staticContent>
    <remove fileExtension=".mem" />
    <mimeMap fileExtension=".mem" mimeType="application/octet-stream" />
    <remove fileExtension=".json" />
    <mimeMap fileExtension=".json" mimeType="application/octet-stream" />
    <remove fileExtension=".data" />
    <mimeMap fileExtension=".data" mimeType="application/octet-stream" />
    <remove fileExtension=".unityweb" />
    <mimeMap fileExtension=".unityweb" mimeType="application/octet-stream" />
    <remove fileExtension=".memgz" />
    <mimeMap fileExtension=".memgz" mimeType="application/octet-stream" />
    <remove fileExtension=".datagz" />
    <mimeMap fileExtension=".datagz" mimeType="application/octet-stream" />
    <remove fileExtension=".unity3dgz" />
    <mimeMap fileExtension=".unity3dgz" mimeType="application/octet-stream" />
    <remove fileExtension=".jsgz" />
    <mimeMap fileExtension=".jsgz" mimeType="application/x-javascript; charset=UTF-8" />
    </staticContent>
    </system.webServer>
    </configuration>

Add Your 2 Cents