Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
irisXQ opened this issue Oct 12, 2019 · 1 comment
Open

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

irisXQ opened this issue Oct 12, 2019 · 1 comment

Comments

@irisXQ
Copy link

irisXQ commented Oct 12, 2019

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 !

@wojiushixiaobai
Copy link

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;
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants