Skip to content
tuxudo edited this page Jun 20, 2023 · 4 revisions

Using IIS as a MunkiReport server is not a recommended server setup. Support for IIS is best effort. Docker, Linux, or cloud based is the recommended server setup.

Put the MunkiReport sources outside the web tree and configure the webserver to serve the public directory.

Creating the .env file

Window won't allow you to create a file named '.env' directly in Windows Explorer. You have some options, though:

IIS crazy hackery (only for people with no fear of breaking things)

If you're hosting MunkiReport on an IIS server, and you're not able to change the document root to /public, there's a possibility to serve the site from a different directory.

To pull this off, you need two directories:

  • munkireport which contains only a web.config file
  • munkireport-sources or another name, that contains the munkireport source files.

In the web.config file you will point to the public folder in the munkireport-sources directory. You will need to adjust the config file as automatic detection of the proper path fails. Add the following to .env:

INDEX_PAGE="index.php?"
SUBDIRECTORY="/munkireport/"
URI_PROTOCOL="QUERY_STRING"

Below is the content of web.config, make changes as necessary.

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
    <rewrite>
      <rules>
          <rule name="my-first-url-rule" stopProcessing="true">
            <match url="^(.*)$" />
            <action type="Rewrite" url="/munkireport_sources/public/{R:1}" appendQueryString="true" />
          </rule>
      </rules>
    </rewrite>
</system.webServer>
</configuration>
Clone this wiki locally