Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- server_name *.bsbp.corp.com bsbp.corp.com;
- server_name_in_redirect off;
- listen 10.179.68.84:443 ssl default_server;
- access_log /var/log/nginx/vhosts/bsbp.corp.com/access.log;
- error_log /var/log/nginx/vhosts/bsbp.corp.com/error.log debug;
- ssl_certificate /etc/ssl/certs/bsbp.corp.com.crt;
- ssl_certificate_key /etc/ssl/certs/bsbp.corp.com.crt;
- root /var/www/html;
- location /pub {
- index index.html;
- }
- location ~ /logout.cgi$ {
- add_header Set-Cookie "jwt_auth_data=;domain=bsbp.corp.com";
- return 302 https://ecoclient.online.corp.com/mainpage;
- }
- location ~ /(?!pub) {
- recursive_error_pages on;
- error_page 402 = /setcookie;
- error_page 401 = /back2eco;
- error_page 406 = /pub;
- if ( $arg_gpbtoken != '' ) {
- auth_request /cookiecheck;
- auth_request_set $my_remote_user $sent_http_remote_user;
- auth_request_set $my_client_id $sent_http_client_id;
- auth_request_set $my_valid_until $sent_http_jwt_valid_until;
- proxy_pass https://goz.corp.com;
- proxy_ssl_certificate /etc/ssl/ca/crt/10.189.68.84.crt;
- proxy_ssl_certificate_key /etc/ssl/ca/private/10.189.68.84.key;
- proxy_ssl_trusted_certificate /etc/ssl/ca/rootCA.crt;
- proxy_ssl_verify on;
- proxy_ssl_verify_depth 1;
- proxy_set_header X-Remote-User $my_remote_user;
- proxy_set_header X-Client-ID $my_client_id;
- proxy_set_header X-Valid-Until $my_valid_until;
- proxy_set_header Host $host;
- }
- location /setcookie {
- internal;
- proxy_pass http://localhost:5000/setcookie;
- proxy_set_header X-Orig-Dest "$scheme://$http_host";
- proxy_set_header X-Request-URI $request_uri;
- }
- location /cookiecheck {
- internal;
- proxy_pass http://localhost:5000/cookiecheck;
- proxy_pass_request_body off;
- proxy_set_header Content-Length "";
- proxy_set_header X-Orig-Dest "$scheme://$http_host";
- proxy_set_header X-Request-URI $request_uri;
- }
- location /back2eco {
- add_header Set-Cookie "BSSREDIR=$scheme://$http_host$request_uri;Domain=ecoclient.online.corp.com;Path=/";
- return 302 https://ecoclient.online.corp.com;
- }
- location /login {
- proxy_pass http://localhost:5000/login;
- proxy_set_header X-Orig-Dest "$scheme://$http_host";
- proxy_set_header X-Request-URI $request_uri;
- }
- }
Add Comment
Please, Sign In to add comment