weavescopeをApache2.4でproxyする方法
1859 ワード
概要
weavescopeはDockerの相関図をリアルタイムに表示してくれるとてもかっこよいソフトだ。
https://github.com/weaveworks/scope
しかし、ポート番号でアクセスするのがかっこ悪いのでproxyを噛まそうとするとよくはまるらしい。
https://github.com/weaveworks/scope/issues/3725
かくいう私もその口。
結論
WebSocketも転送してやらないとならない
Apacheの設定ファイル例のコピペ
via https://github.com/weaveworks/scope/issues/3725#issuecomment-567626454
<VirtualHost *:443>
ServerName weavescope.<your domain>.jp
SSLEngine on
ServerAdmin webmaster@localhost
SSLCertificateFile /etc/letsencrypt/live/<your domain>/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/<your domain>/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/<your domain>/chain.pem
ProxyRequests Off
ProxyPreserveHost On
RewriteEngine On
RewriteCond %{HTTP:Connection} Upgrade [NC]
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteRule /(.*) ws://localhost:4040/$1 [P,L]
RequestHeader set X-Forwarded-Proto "https"
RequestHeader set X-Forwarded-Port "443"
ProxyPass / http://localhost:4040/
ProxyPassReverse / http://localhost:4040/
ProxyPass / ws://localhost:4040/
ProxyPassReverse / ws://localhost:4040/
</VirtualHost>
Author And Source
この問題について(weavescopeをApache2.4でproxyする方法), 我々は、より多くの情報をここで見つけました https://qiita.com/thisprogrammer/items/4b304b1e5fcb4c27e4bf著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .