Nginx vhost config for LL::NG::Handler part (#583)
This commit is contained in:
parent
42b351bf58
commit
e5ee68cace
34
_example/etc/handler-nginx.conf
Normal file
34
_example/etc/handler-nginx.conf
Normal 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;
|
||||
#}
|
||||
}
|
||||
|
||||
|
31
_example/etc/test-nginx.conf
Normal file
31
_example/etc/test-nginx.conf
Normal 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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user