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

websoft9 run with only one port 9000 #494

Open
qiaofeng1227 opened this issue May 17, 2024 · 4 comments
Open

websoft9 run with only one port 9000 #494

qiaofeng1227 opened this issue May 17, 2024 · 4 comments
Assignees

Comments

@qiaofeng1227
Copy link
Contributor

qiaofeng1227 commented May 17, 2024

It is need to two ports to run websoft9

  • cockpit port
  • nginx proxy port(80 or other)

improve:
only use 9000 port on nginx, cockpit also use nginx proxy
http://ip:9000/console?

@qiaofeng1227
Copy link
Contributor Author

qiaofeng1227 commented May 20, 2024

how to set proxy about cockpit in Nginx(package install)?

@qiaofeng1227
Copy link
Contributor Author

安装可以占用多个端口,安全组只开放一个端口实现。

@qiaofeng1227
Copy link
Contributor Author

nginx 转发 cockpit方案:

  1. 使用172.17.0.1:9000
  2. 内部组dns

@qiaofeng1227
Copy link
Contributor Author

qiaofeng1227 commented May 28, 2024

initproxy.conf

  location /console/ {
    proxy_pass http://172.17.0.1:9000/console/;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-Proto $scheme;

    proxy_http_version 1.1;
    proxy_buffering off;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";

    gzip off;
  }

[root@test001 proxy_host]# cat /etc/cockpit/cockpit.conf

# docs: https://cockpit-project.org/guide/latest/cockpit.conf.5.html

[WebService]
AllowUnencrypted = true
Origins = http://119.8.25.33:9999 ws://119.8.25.33:9999
LoginTitle= Websoft9 - Linux AppStore
ProtocolHeader = X-Forwarded-Proto
UrlRoot=/console

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