How to NGINX
server {
listen 8084;
server_name localhost;
# http://stackoverflow.com/questions/24432426/pass-arguments-to-auth-request-module-from-nginx
# http://serverfault.com/questions/379675/nginx-reverse-proxy-url-rewrite
#location ~ ^/esb-alive-service/([a-zA-Z0-9]+)/([a-zA-Z0-9]+) {
location ~ ^/alfresco/content {
set $auth_request_uri "http://nipd03.xxx.com:48080/alfresco/service/cetin/document?customerNumber=5&$args";
auth_request /auth;
# rewrite /alfresco/content http://nipd03.xxx.com:48080/alfresco/api/-default-/public/cmis/versions/1.1/atom/content?$args;
rewrite /alfresco/content /alfresco/api/-default-/public/cmis/versions/1.1/atom/content?$args break;
proxy_pass http://nipd03.xxx.com:48080;
proxy_pass_request_body off;
proxy_set_header Content-Length "";
proxy_set_header X-Original-URI $request_uri;
# proxy_set_header Authorization "Basic YWRtaW46YWRtaW4=";
}
location /auth {
#return 200;
#internal;
proxy_pass $auth_request_uri;
proxy_pass_request_body off;
proxy_set_header Content-Length "";
proxy_set_header X-Original-URI $request_uri;
# proxy_set_header Authorization "Basic YWRtaW46YWRtaW4=";
}
}