This module provides basic support for X-Sendfile and X-Accel-Redirect headers.
Either compile again for the target .net environment or use the supplied .net 4 dll
For more details on what the below settings mean and do, please consult Apache or NGinx documentation
- Copy the assembly compiled to the /BIN directory located in the root of your application.
- If this directory does not exist, create it.
- Configure the module and handler to be loaded in the application.
- Open the IIS7 Administration tool
- double-click on your server node in the left-hand tree view, then expand the “Sites” node, and click on the site or application to which you would like to add your module and handler.
- Select the “Modules” feature icon, then click the “Add Managed Module…” action, and in the resulting dialog box type in the module name (arbitrary) and the fully-qualified module type “XSendfile.XSendfileHttpModule”.
- Press OK to add the module.
Select one of the optional configurations below:
- Open the IIS manager
- Select your web application
- Double click application settings
- Click add…
- name: XSendDir
- value (for example): c:\inetpub\private
- Open the IIS manager
- Select your web application
- Double click application settings
- Click add…
- name: XAccelLocation
- value (for example): /virtual/path
- Click add…
- name: XAccelRoot
- value (for example): c:/base/dir
- Click add…
- XSendCache: [NoCache|Private|Public] (defaults to NoCache)
- XSendMime: False (defaults to null)
- If this setting is not set then the mime type will be set using your IIS site mime settings
- Setting this to false means the Content-Type header needs to be set by your application
- Make sure the directory exists
- You can run the following command to provide the IIS User read/write access
- icacls c:\inetpub\private /grant BUILTIN\IIS_IUSRS:RW