parent
17520e438f
commit
c1ca7b971a
@ -0,0 +1,25 @@
|
||||
# nginx config:
|
||||
|
||||
location ~* /[^auth] {
|
||||
auth_request /auth;
|
||||
auth_request_set $username $upstream_http_x_username;
|
||||
auth_request_set $my_error_page $upstream_http_x_error_page;
|
||||
add_header X-Set-Username $username;
|
||||
# Do your business here
|
||||
}
|
||||
|
||||
location = /auth {
|
||||
gzip off;
|
||||
auth_request off;
|
||||
include fastcgi_params;
|
||||
fastcgi_max_temp_file_size 0;
|
||||
fastcgi_split_path_info ^((?U).+auth)(/?.+)$;
|
||||
fastcgi_pass unix:/var/run/php5-fpm/php5-fpm.sock;
|
||||
#fastcgi_param HTTP_AUTH_PERMIT_USERS user@domain.tld;
|
||||
fastcgi_param DOCUMENT_ROOT $document_root;
|
||||
fastcgi_param SCRIPT_FILENAME /var/share/www-data/scripts/authentication.php;
|
||||
fastcgi_param SCRIPT_NAME authentication.php;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
|
||||
internal;
|
||||
}
|
Loading…
Reference in new issue