Commit e5ee68ca authored by FX Deltombe's avatar FX Deltombe

Nginx vhost config for LL::NG::Handler part (#583)

parent 42b351bf
#====================================================================
# Nginx configuration for LemonLDAP::NG Handler
#====================================================================
# Load LemonLDAP::NG Handler
perl_require Lemonldap/NG/Handler.pm;
# Common error page and security parameters
#error_page 403 http://auth.example.com/?lmError=403;
#error_page 500 http://auth.example.com/?lmError=500;
#error_page 503 http://auth.example.com/?lmError=503;
server {
listen *:80;
server_name reload.example.com;
# Configuration reload mechanism (only 1 per physical server is
# needed): choose your URL to avoid restarting Apache when
# configuration change
location /reload {
allow 127.0.0.0/8;
deny all;
perl Lemonldap::NG::Handler::refresh;
}
# Uncomment this to activate status module
#location /status {
# allow 127.0.0.0/8;
# deny all;
# perl Lemonldap::NG::Handler::refresh;
#}
}
#====================================================================
# Nginx configuration for LemonLDAP::NG sample applications
#====================================================================
# Sample application
server {
listen *:80;
server_name test1.example.com test2.example.com;
# SSO protection
location / {
auth_request /auth;
error_page 403 @maybe302;
#proxy_pass http://target.example.com/;
}
set $redirectURL "";
location @maybe302 {
if ($redirectURL) {
rewrite .* $redirectURL redirect;
}
return 403;
}
location = /auth {
perl Lemonldap::NG::Handler::run;
}
# DocumentRoot
root /usr/local/lemonldap-ng/htdocs/test/;
autoindex on;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment