Im using nginx to redirect my API code and apache guacamole. i have an issue that i need to use multiuser connection but if im logged in to Auser and i try to connect to Buser ( same browser) it try to reconnect to Auser even if the URL is complitly different :
Auser:
https://myapp/#/client/MjIyAGMAcG9zdGdyZXNxbA==/?username=Auser&password=vDeMsKqCG5F
Buser:
https://myapp/#/client/NTQxAGMAcG9zdGdyZXNxbA==/?username=Buser&password=0aiOMa4o08pb
nginx conf:
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
fastcgi_read_timeout 600;
proxy_read_timeout 600;
keepalive_timeout 600;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile off;
#tcp_nopush on;
#gzip on;
include /etc/nginx/conf.d/*.conf;
}
nginx/mysite.template:
server {
listen 80;
server_name localhost;
server_name reverse.proxy
server_tokens off;
location / {
proxy_pass http://guacamole:8080/guacamole/;
proxy_buffering off;
proxy_hide_header Set-Cookie;
proxy_ignore_headers Set-Cookie;
proxy_set_header Cookie "";
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
proxy_cookie_path /guacamole/ /;
access_log on;
client_max_body_size 4096m;
}
location /api {
proxy_pass http://api:5001/;
rewrite /api/(.*) /$1 break;
proxy_hide_header Set-Cookie;
proxy_ignore_headers Set-Cookie;
proxy_set_header Cookie "";
proxy_buffering off;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
access_log on;
client_max_body_size 4096m;
}
}
Tried maybe to delete the cookies by :
proxy_hide_header Set-Cookie;
proxy_ignore_headers Set-Cookie;
proxy_set_header Cookie "";
but same result. how can i make ngnix to give uniq session to each request? to ignor user that is alreat connectd. maybe its the chrome broser issue for shering session data but can nginx settings help here ?