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

This commit is contained in:
François-Xavier Deltombe 2014-05-22 10:10:40 +00:00
parent 42b351bf58
commit e5ee68cace
2 changed files with 65 additions and 0 deletions

View File

@ -0,0 +1,34 @@
#====================================================================
# 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;
#}
}

View File

@ -0,0 +1,31 @@
#====================================================================
# 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;
}