GateOne icon indicating copy to clipboard operation
GateOne copied to clipboard

proxy config-Some web proxies do not work properly with WebSockets.

Open irisXQ opened this issue 5 years ago • 1 comments

Dears: I use nginx to proxy the gateone with config like this:

server {
           listen 8888;
           server_name gateone.shb;
           location / {
               proxy_pass http://192.168.8.122:2222/;
       	proxy_set_header X-Real-IP $remote_addr;
           	proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
           	proxy_set_header Host $http_host;
           	proxy_set_header X-NginX-Proxy true;

	}
   }

and the config of gateone is :

# -*- coding: utf-8 -*-
locale = "zh_CN"
pam_service = "login"
syslog_facility = "daemon"
syslog_host = None
enable_unix_socket = False
port = 2222
uid = "0"
url_prefix = "/"
user_dir = "/trm/gateone/users"
dtach = True
certificate = "certificate.pem"
log_to_stderr = False
session_logs_max_age = "30d"
gid = "0"
pid_file = "/var/run/gateone.pid"
sso_realm = None
cookie_secret = "ZTUxYTU4ZjliZmNlNGYyZDlkMzU5MDZlNmNlZWM2ZmZjM"
pam_realm = "zjjjkjyfqz01"
sso_service = "HTTP"
https_redirect = False
syslog_session_logging = False
disable_ssl = True
debug = False
session_dir = "/tmp/gateone"
auth = "none"
address = ""
api_timestamp_window = "30s"
log_file_num_backups = 10
logging = "info"
embedded = False
origins ="http://gateone.shb:8888;192.168.8.122:2222;"

when i open http://gateone.shb:8888, the website shows image

and i can get the visit records in gateone log: image

whether any config is wrong? Any sugession is greatful !

irisXQ avatar Oct 12 '19 13:10 irisXQ

server {
    listen 8888;
    server_name gateone.shb;
    location / {
        proxy_pass http://192.168.8.122:2222/;
       	proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}

wojiushixiaobai avatar Aug 20 '20 14:08 wojiushixiaobai