{"id":2888,"date":"2015-01-18T11:36:57","date_gmt":"2015-01-18T02:36:57","guid":{"rendered":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/?p=2888"},"modified":"2015-01-18T11:36:57","modified_gmt":"2015-01-18T02:36:57","slug":"os-x-server-4-0-3-%e3%81%a7-gateone-head","status":"publish","type":"post","link":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/2015\/2888","title":{"rendered":"OS X Server 4.0.3 \u3067 GateOne HEAD"},"content":{"rendered":"<p>\u30cf\u30de\u3063\u305f\u306e\u3067\u30e1\u30e2\u3002<\/p>\n<p>\u6700\u8fd1 http\/s \u306f\u901a\u308b\u306e\u306b ssh \u304c\u901a\u3089\u306a\u304f\u3066\u30a4\u30e9\u3064\u304f\u3053\u3068\u304c\u591a\u3005\u3042\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u3060\u3063\u305f\u3089 web \u30d9\u30fc\u30b9\u306e ssh \u5165\u308c\u308c\u3070\u3044\u3044\u3093\u3058\u3083\u306d\u3001\u3068\u304b\u601d\u3044\u7acb\u3063\u3066\u5165\u308c\u3066\u307f\u307e\u3057\u305f\u3002\u3067\u3001\u3066\u304d\u3068\u30fc\u306b\u30b0\u30b0\u3063\u3066\u76ee\u306b\u4ed8\u3044\u305f <a href=\"http:\/\/liftoffsoftware.com\/Products\/GateOne\">GateOne<\/a> \u3092\u5165\u308c\u3066\u307f\u308b\u3053\u3068\u306b\u3057\u305f\u306e\u3067\u3059\u3002<br \/>\n\u6700\u521d\u306f <a href=\"http:\/\/pkgsrc.org\/\">pkgsrc<\/a> \u3067\u9811\u5f35\u308d\u3046\u3068\u52aa\u529b\u3057\u3066 <a href=\"http:\/\/imil.net\/wp\/2013\/01\/26\/gateone-more-than-a-web-based-ssh\/\">GateOne, more than a web-based SSH<\/a> \u3092\u8aad\u307f\u306a\u304c\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u307e\u3067\u9032\u3081\u3066\u3001\u6700\u65b0\u30ea\u30ea\u30fc\u30b9\u306e 1.1 \u3060\u3068 <a href=\"http:\/\/www.tornadoweb.org\/en\/stable\/\">tornado 3<\/a> \u4ee5\u964d\u306f\u672a\u5bfe\u5fdc\u3060\u304b\u3089 git \u6700\u65b0\u3092\u4f7f\u3046\u5fc5\u8981\u304c\u3042\u308b\u3063\u3066\u3068\u3053\u308d\u307e\u3067\u9032\u3081\u305f\u3093\u3067\u3059\u304c\u3001 OS X \u7d14\u6b63\u306e httpd \u3067\u53d7\u3051\u308b\u3064\u3082\u308a\u306a\u3089 OS X \u306e python \u4f7f\u3046\u307b\u3046\u304c\u6b63\u7fa9\u3068\u3044\u3046\u3053\u3068\u3092\u601d\u3044\u51fa\u3057\u3066\u3001\u7d50\u5c40 python setup.py install \u3068\u304b\u3067\u304a\u8336\u3092\u6fc1\u3059\u3053\u3068\u306b\u306a\u308a\u307e\u3057\u305f\u2026\u3002<\/p>\n<p><!--more--><\/p>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067 gateone \u81ea\u4f53\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u3053\u3093\u306a<\/p>\n<pre><code class=\"bash\">$ git clone https:\/\/github.com\/liftoff\/GateOne.git\n$ cd GateOne\n$ git archive --format=tar HEAD |tar xvf - -C ~\/work\/gateone\n$ cd ~\/work\/gateone\n$ sudo python .\/setup.py install\n<\/code><\/pre>\n<p>\u6c17\u6301\u3061\u7684\u306b \/usr\/local \u4ee5\u4e0b\u3067\u52d5\u304b\u3057\u305f\u304b\u3063\u305f\u306e\u3067<\/p>\n<pre><code class=\"bash\">$ sudo mkdir -p \/usr\/local\/etc\/gateone\n$ sudo vi \/usr\/local\/etc\/gateone\/server.conf\n<\/code><\/pre>\n<p>\u3068\u304b\u3057\u3066<a href=\"http:\/\/liftoff.github.io\/GateOne\/About\/index.html#configuration\">\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/a>\u306b\u66f8\u3044\u3066\u3042\u308b\u8a2d\u5b9a\u305d\u306e\u307e\u307e\u30b3\u30d4\u30fc\u3057\u3066\u304b\u3089<\/p>\n<pre><code class=\"bash\">$ sudo gateone --settings_dir=\/usr\/local\/etc\/gateone\n<\/code><\/pre>\n<p>\u3068\u52d5\u304b\u3057\u3066\u307f\u305f\u3089<\/p>\n<pre><code class=\"bash\">goro@flora:\/usr\/local\/etc\/gateone$ sudo gateone --settings_dir=\/usr\/local\/etc\/gateone\n[W 150117 23:33:30 locale:61] No translation found for locale: ja_JP\n[E 150117 23:33:30 configuration:994] Error decoding JSON in settings file: \/usr\/local\/etc\/gateone\/server.conf\n[E 150117 23:33:30 configuration:995] No JSON object could be decoded\nGot an exception trying to display precisely where the problem was. This usually happens when you've used single quotes (') instead of double quotes (\").\n[I 150117 23:33:30 configuration:705] Gate One settings are incomplete. A new \/10server.conf will be generated.\n[I 150117 23:33:30 server:4167] Gate One License: AGPLv3 (http:\/\/www.gnu.org\/licenses\/agpl-3.0.html)\n[I 150117 23:33:30 server:4176] Imported applications: Terminal\n[I 150117 23:33:30 server:4328] Version: 1.2.0 (20140920142541)\n[I 150117 23:33:30 server:4329] Tornado version 4.0.2\n[I 150117 23:33:30 server:4349] Connections to this server will be allowed from the following origins: 'localhost 127.0.0.1 flora.hyrule.jp 192.168.0.3'\n[I 150117 23:33:30 server:3666] No authentication method configured. All users will be ANONYMOUS\n[I 150117 23:33:30 server:3747] Loaded global plugins: gateone.plugins.editor, gateone.plugins.help\n[I 150117 23:33:30 server:4470] Listening on https:\/\/*:443\/\n[E 150117 23:33:30 server:4532] Could not listen on 0.0.0.0:443 (address:port is already in use by another application).\n[E 150117 23:33:30 server:4546] Exception was: (48, 'Address already in use')\n[I 150117 23:33:30 server:4553] Clearing cache_dir: \/tmp\/gateone_cache\n[I 150117 23:33:30 server:4556] pid file removed.\ngoro@flora:\/usr\/local\/etc\/gateone$ ls\n10server.conf 20authentication.conf 50terminal.conf old\/ server.conf users\/\n<\/code><\/pre>\n<p>\u3068\u304b\u30a8\u30e9\u30fc\u5410\u3044\u305f\u6319\u53e5\u306b\u3054\u4e01\u5be7\u306b\u5fc5\u8981\u306a\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044\u307e\u3057\u305f\u3088\u2026\u3002<br \/>\n\u3068\u3044\u3046\u304b\u591a\u5206\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306b\u66f8\u304b\u308c\u3066\u3044\u308b\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306f 1.1 \u5411\u3051\u3067\u3001 HEAD \u306f\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u304c JSON \u5f62\u5f0f\u306b\u5909\u308f\u3063\u305f\u3063\u3066\u3053\u3068\u306a\u3093\u3060\u308d\u3046\u306d\u3002<br \/>\n\u3067\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u3060\u3068\u52dd\u624b\u8a3c\u660e\u66f8\u3067 443 \u3092\u30ea\u30c3\u30b9\u30f3\u3057\u3088\u3046\u3068\u3057\u3066\u30b3\u30b1\u308b(443 \u306f apache \u304c\u5148\u306b\u63b4\u3093\u3067\u308b\u304b\u3089\u306d)\u3093\u3060\u3051\u3069\u3001\u4eca\u56de\u306f\u3059\u3067\u306b\u52d5\u3044\u3066\u308b httpd \u306e\u88cf\u3067\u52d5\u304b\u3059\u306e\u3067 https \u306f\u4e0d\u8981\u306a\u306e\u3067\u300110server.conf \u3092\u3053\u3093\u306a\u611f\u3058\u3067\u3066\u304d\u3068\u30fc\u306b\u5909\u66f4\u3057\u3066<\/p>\n<pre><code>\"disable_ssl\": true,\n\"port\": 5443,\n\"url_prefix\": \"\/gateone\/\",\n<\/code><\/pre>\n<p>\/Library\/Server\/Web\/Config\/apache2\/sites\/0000_any_443_.conf \u306b<\/p>\n<pre><code>ProxyPass \/gateone http:\/\/127.0.0.1:5443\/gateone\nProxyPassReverse \/gateone http:\/\/127.0.0.1:5443\/gateone\n<\/code><\/pre>\n<p>\u3068 Proxy \u306e\u8a2d\u5b9a\u3092\u5165\u308c\u3066\u3001\u3055\u3042\u3063\u3066\u3084\u3063\u305f\u3089 5443 \u76f4\u306b\u306f\u30a2\u30af\u30bb\u30b9\u3067\u304d\u3066\u52d5\u3044\u3066\u308b\u3093\u3060\u3051\u3069\u3001 apache \u7d4c\u7531\u3067\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068\u3061\u3083\u3093\u3068\u52d5\u304b\u306a\u3044\u98a8\u5473\u3002\u30ed\u30b0\u3092\u773a\u3081\u308b\u3068<\/p>\n<pre><code>[Sat Jan 17 23:32:36.951856 2015] [proxy:error] [pid 98859] AH00940: WS: disabled connection for (127.0.0.1)\n<\/code><\/pre>\n<p>\u3068\u304b<\/p>\n<pre><code>flora.hyrule.jp 192.168.0.26 - - [17\/Jan\/2015:23:06:37 +0900] \"GET \/gateone\/ws HTTP\/1.1\" 400 54 \"-\" \"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10.10; rv:35.0) Gecko\/20100101 Firefox\/35.0\"\n<\/code><\/pre>\n<p>\u3068\u3044\u3046\u611f\u3058\u3002 proxy \u304c\u30a8\u30e9\u30fc\u5410\u3044\u3066\u308b\u4e0a\u306b gateone \u304b\u3089 400 \u304c\u623b\u3063\u3066\u308b\u2026? \u3068\u76f8\u5f53\u60a9\u3093\u3060\u672b\u306b\u51fa\u305f\u7d50\u8ad6\u304c<\/p>\n<ul>\n<li>mod_proxy \u306f websocket \u672a\u5bfe\u5fdc<\/li>\n<\/ul>\n<p>\u2026\u304a\u304a\u3046\u3002<br \/>\n\u30de\u30b8\u77e5\u3089\u306a\u304b\u3063\u305f\u3093\u3067\u3059\u304c\u3001 apache \u306e mod_proxy \u306f websocket \u672a\u5bfe\u5fdc\u3067\u3001 apache 2.4.5 \u4ee5\u964d\u304b\u3089 <a href=\"http:\/\/httpd.apache.org\/docs\/2.4\/mod\/mod_proxy_wstunnel.html\">mod_proxy_wstunnel<\/a> \u3067\u5bfe\u5fdc\u3057\u305f\u305d\u30fc\u3067\u3059\u3002 OS X Server \u306f\u78ba\u304b 4.0 \u304b\u3089 apache 2.4 \u7cfb\u306b\u4e0a\u304c\u3063\u305f\u306f\u305a\u306a\u306e\u3067\u3001\u30bf\u30a4\u30df\u30f3\u30b0\u306f\u3061\u3087\u3046\u3069\u826f\u304b\u3063\u305f\u3067\u3059\u306d\u3002<br \/>\n\u3068\u3044\u3046\u3053\u3068\u3067\u6539\u3081\u3066 websocket \u7528\u306e\u8a2d\u5b9a\u3092\u8ffd\u52a0\u3057\u3066<\/p>\n<pre><code class=\"text\">ProxyPass \/gateone\/ws ws:\/\/127.0.0.1:5443\/gateone\/ws\nProxyPass \/gateone http:\/\/127.0.0.1:5443\/gateone\nProxyPassReverse \/gateone\/ws ws:\/\/127.0.0.1:5443\/gateone\/ws\nProxyPassReverse \/gateone http:\/\/127.0.0.1:5443\/gateone\n<\/code><\/pre>\n<p>\u8a66\u3057\u3066\u307f\u305f\u3089\u7121\u4e8b\u306b\u52d5\u304d\u307e\u3057\u305f\u3002<br \/>\n\u304c\u3001\u3053\u306e\u307e\u307e\u3060\u3068 gateone \u3092\u5168\u3066\u306b\u516c\u958b\u3068\u306a\u3063\u3066\u30c0\u30b5\u3044\u306e\u3067\u3001<\/p>\n<pre><code>&lt;location \/gateone&gt;\n    AuthType Digest\n    AuthName \"GateOne\"\n    AuthUserFile \/usr\/local\/etc\/gateone\/gateone.digest\n    Require valid-user\n&lt;\/location&gt;\n<\/code><\/pre>\n<p>\u3068\u5236\u9650\u304b\u3051\u305f\u3089 apache \u304c\u8d77\u52d5\u3057\u306a\u304f\u306a\u3063\u3066\u3057\u307e\u3063\u305f\u2026\u3002<\/p>\n<blockquote class=\"twitter-tweet\" data-width=\"500\" data-dnt=\"true\">\n<p lang=\"ja\" dir=\"ltr\">AuthType Digest \u3067\u30a8\u30e9\u30fc\u304c\u3001\u3068\u304b\u60a9\u3093\u3067\u3044\u305f\u3089 auth_digest_apple_module \u304c\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3055\u308c\u3066\u3044\u308b\u3001\u3068\u3044\u3046\u30aa\u30c1\u3067\u3042\u3063\u305f\u2026\u3002\u3069\u3046\u305b https \u3057\u304b\u8a31\u53ef\u3057\u3066\u306a\u3044\u3057 Basic \u3067\u3082\u3044\u3044\u306e\u304b\u3057\u3089\u3093\u2026?<\/p>\n<p>&mdash; Kiyono, Goro (@goro1080) <a href=\"https:\/\/twitter.com\/goro1080\/status\/556474323032997888?ref_src=twsrc%5Etfw\">January 17, 2015<\/a><\/p><\/blockquote>\n<p><script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script><br \/>\n\u3068\u3044\u3046\u30aa\u30c1\u306a\u306e\u3060\u3051\u308c\u3069\u3082\u3001\u3068\u308a\u3042\u3048\u305a\u306f auth_digest_apple_module \u3092\u6709\u52b9\u5316\u3057\u3066 digest \u8a8d\u8a3c\u52b9\u304f\u3088\u3046\u306b\u3057\u307e\u3057\u305f\u3002<br \/>\n\u3042\u3068\u3001 root \u3067\u52d5\u304f\u306e\u306f\u6c17\u6301\u3061\u60aa\u3044\u306e\u3067<\/p>\n<pre><code>sudo dscl . -create \/Groups\/_gateone PrimaryGroupID 311\nsudo dscl . -create \/Users\/_gateone UniqueID 311\nsudo dscl . -create \/Users\/_gateone PrimaryGroupID 311\nsudo dscl . -create \/Users\/_gateone UserShell \/bin\/false\nsudo dscl . -create \/Users\/_gateone NFSHomeDirectory \/usr\/local\/etc\/gateone\nsudo dscl . -create \/Users\/_gateone RealName GateOne\nsudo dscl . -create \/Groups\/_gateone GroupMembership _gateone\n<\/code><\/pre>\n<p>\u3068 gateone \u7528\u306e\u30e6\u30fc\u30b6\u30fc\/\u30b0\u30eb\u30fc\u30d7\u3092\u4f5c\u6210\u3057\u3066<\/p>\n<pre><code>&lt; ?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\n&lt; !DOCTYPE plist PUBLIC \"-\/\/Apple Computer\/\/DTD PLIST 1.0\/\/EN\" \"http:\/\/www.apple.com\/DTDs\/PropertyList-1.0.dtd\"&gt;\n&lt;plist version=\"1.0\"&gt;\n&lt;dict&gt;\n        &lt;key&gt;Label&lt;\/key&gt;\n        &lt;string&gt;com.liftoffsoftware.gateone.&lt;\/string&gt;\n        &lt;key&gt;ProgramArguments&lt;\/key&gt;\n        &lt;array&gt;\n        &lt;string&gt;\/usr\/bin\/python&lt;\/string&gt;\n        &lt;string&gt;\/usr\/local\/bin\/gateone&lt;\/string&gt;\n        &lt;string&gt;--settings_dir=\/usr\/local\/etc\/gateone&lt;\/string&gt;\n        &lt;\/array&gt;\n        &lt;key&gt;WorkingDirectory&lt;\/key&gt;\n        &lt;string&gt;\/usr\/local\/etc\/gateone&lt;\/string&gt;\n        &lt;key&gt;KeepAlive&lt;\/key&gt;\n        &lt;true&gt;&lt;\/true&gt;\n        &lt;key&gt;UserName&lt;\/key&gt;\n        &lt;string&gt;_gateone&lt;\/string&gt;\n        &lt;key&gt;GroupName&lt;\/key&gt;\n        &lt;string&gt;_gateone&lt;\/string&gt;\n&lt;\/dict&gt;\n&lt;\/plist&gt;\n<\/code><\/pre>\n<p>\u3068\u304b plist \u4f5c\u3063\u305f\u3068\u3053\u308d\u3001\u3069\u3046\u3084\u3089\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3088\u3046\u3067\u3059\u3002\u3057\u304b\u3057 GateOne \u81ea\u4f53\u306e\u8a8d\u8a3c\u3092\u4f7f\u3063\u3066\u306a\u304f\u3001 GateOne \u7684\u306b\u306f anonymous \u3067\u306e\u30a2\u30af\u30bb\u30b9\u3063\u307d\u3044\u306e\u3067\u3001 Digest \u8a8d\u8a3c\u3084\u3081\u3066 GateOne \u81ea\u4f53\u306e\u8a8d\u8a3c\u3092\u4f7f\u3046\u3088\u3046\u306b\u3059\u308b\u306e\u304c\u3044\u3044\u3093\u3060\u308d\u3046\u306a\u3041\u2026\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30cf\u30de\u3063\u305f\u306e\u3067\u30e1\u30e2\u3002 \u6700\u8fd1 http\/s \u306f\u901a\u308b\u306e\u306b ssh \u304c\u901a\u3089\u306a\u304f\u3066\u30a4\u30e9\u3064\u304f\u3053\u3068\u304c\u591a\u3005\u3042\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u3060\u3063\u305f\u3089 web \u30d9\u30fc\u30b9\u306e ssh \u5165\u308c\u308c\u3070\u3044\u3044\u3093\u3058\u3083\u306d\u3001\u3068\u304b\u601d\u3044\u7acb\u3063\u3066\u5165\u308c\u3066\u307f\u307e\u3057\u305f\u3002\u3067\u3001\u3066\u304d\u3068\u30fc\u306b\u30b0\u30b0\u3063\u3066\u76ee\u306b [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,6],"tags":[54,77,62,65,23],"class_list":["post-2888","post","type-post","status-publish","format-standard","hentry","category-mac","category-misc","tag-launchd","tag-mac","tag-os-x-server","tag-python","tag-software"],"_links":{"self":[{"href":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/wp-json\/wp\/v2\/posts\/2888","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/wp-json\/wp\/v2\/comments?post=2888"}],"version-history":[{"count":18,"href":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/wp-json\/wp\/v2\/posts\/2888\/revisions"}],"predecessor-version":[{"id":2907,"href":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/wp-json\/wp\/v2\/posts\/2888\/revisions\/2907"}],"wp:attachment":[{"href":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/wp-json\/wp\/v2\/media?parent=2888"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/wp-json\/wp\/v2\/categories?post=2888"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/wp-json\/wp\/v2\/tags?post=2888"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}