I want to restrict access to some static content, served using nginx, using an existing SAML 2.0 IdP. (In Apache, this would be done with a module such as mod_mellon or mod_auth_saml)

What is the best way to use SAML authentication for static content on nginx? If it is still the use of X-Accel headers, is there a helper script out there to proxy from a SAML authentication or do I need to start from scratch for this?

3 Answers 3


Someone or the shib project has a free SSO dynamic module for nginx.



You can try auth-request module as mentioned : SSO with Nginx


It's 2017 now and there is still no module in nginx, no matter free or paid, to get SAML authentication.

I wouldn't expect it to be available anytime soon, considering it's been missing for almost a decade.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.