Git Product home page Git Product logo

iis-x-sendfile-plugin's Introduction

X-Sendfile and X-Accel-Redirect Support for IIS 7.x

This module provides basic support for X-Sendfile and X-Accel-Redirect headers.

Usage

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

Install the DLL

  • 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:

Config the base directory if using X-Sendfile (optional)

  1. Open the IIS manager
  2. Select your web application
  3. Double click application settings
    • Click add…
    • name: XSendDir
    • value (for example): c:\inetpub\private

Config location if using X-Accel-Redirect (optional)

  1. Open the IIS manager
  2. Select your web application
  3. Double click application settings
    • Click add…
      • name: XAccelLocation
      • value (for example): /virtual/path
    • Click add…
      • name: XAccelRoot
      • value (for example): c:/base/dir

Common Settings

  • 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

Ensure IIS has access

  • 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

iis-x-sendfile-plugin's People

Contributors

stakach avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.