<div dir="ltr">I've upgraded the OS now and it works with the new Nginx. Thanks for helping out!</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 24, 2015 at 9:25 PM, Pierre Tardy <span dir="ltr"><<a href="mailto:tardyp@gmail.com" target="_blank">tardyp@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">good to know, thanks for the update.<div><br></div></div><div class="HOEnZb"><div class="h5"><br><div class="gmail_quote"><div dir="ltr">Le mar. 24 nov. 2015 à 21:14, Martin Vilcans <<a href="mailto:martin@librador.com" target="_blank">martin@librador.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Yes, I have checked that. But now I think I have found the problem: WebSockets are supported only from Nginx 1.3 (according to <a href="https://www.nginx.com/blog/websocket-nginx/#gs.zSbvRCE" target="_blank">https://www.nginx.com/blog/websocket-nginx/#gs.zSbvRCE</a>), and I'm running 1.2.1, which seems to be ancient (as the latest version is 1.9.7). That's what you get for using a LTS release of Ubuntu, I suppose. I'll check tomorrow. Thanks.</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 24, 2015 at 6:52 PM, Francesco Di Mizio <span dir="ltr"><<a href="mailto:francescodimizio@gmail.com" target="_blank">francescodimizio@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I recently happened to set up an nginx server before buildbot nine beta 5.<div><br></div><div>My config:</div><div><br></div><div><div>server {</div><div>    listen 80;</div><div>    location / {</div><div>            # try_build is the name used by --link when starting this nginx container</div><div>            proxy_pass <a href="http://try_build:8050/" target="_blank">http://try_build:8050/</a>;</div><div>        }</div><div>        </div><div>    location /ws {</div><span><div>              proxy_http_version 1.1;</div><div>              proxy_set_header Upgrade $http_upgrade;</div><div>              proxy_set_header Connection "upgrade";</div></span><div>              proxy_pass <a href="http://try_build:8050/ws" target="_blank">http://try_build:8050/ws</a>;</div><span><div>              # raise the proxy timeout for the websocket</div><div>              proxy_read_timeout 6000s;</div><div>        }</div><div>}</div></span></div><div><br></div><div>Websockets work ok. </div><div><br></div><div>Are you sure you've configured buildbotURL correctly? In case of mismatch many things will stop working. Do you get any message about such a misconfig when opening the web home?</div><div><br></div><div><br></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 24, 2015 at 4:33 PM, Martin Vilcans <span dir="ltr"><<a href="mailto:martin@librador.com" target="_blank">martin@librador.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">OK, thanks for your answer.<div><br></div><div>Yeah, I tried configuring Nginx as a reverse proxy first, but I never got it to work with websockets. Are the SSL related things in the example configuration needed? I don't exactly enjoy setting up SSL. :-)<div><div><br></div><div>The error I get in the browser's console is that the connection seems to time out:</div><div>







<p>scripts.js?_1445513624809:14 ReconnectingWebSocket onerror ws://redacted/buildbot/ws Event {isTrusted: true}</p><p>scripts.js?_1445513624809:14 ReconnectingWebSocket attempt-connect ws://redacted/buildbot/ws</p><p>scripts.js?_1445513624809:14 ReconnectingWebSocket connection-timeout ws://redacted/buildbot/ws</p><p>scripts.js?_1445513624809:14 WebSocket connection to 'ws://redacted/buildbot/ws' failed: WebSocket is closed before the connection is established.</p><p>scripts.js?_1445513624809:14 ReconnectingWebSocket onerror ws://redacted/buildbot/ws Event {isTrusted: true}</p><p>scripts.js?_1445513624809:14 ReconnectingWebSocket attempt-connect ws://redacted/buildbot/ws</p><p>scripts.js?_1445513624809:14 ReconnectingWebSocket connection-timeout ws://redacted/buildbot/ws</p><p>scripts.js?_1445513624809:14 WebSocket connection to 'ws://redacted/buildbot/ws' failed: WebSocket is closed before the connection is established.</p><p>scripts.js?_1445513624809:14 ReconnectingWebSocket onerror ws://redacted/buildbot/ws Event {isTrusted: true}</p></div><div><br></div><div><br></div><div>Here's the Nginx config:</div><div><br></div><div>







<p><span>server {</span></p>
<p>    auth_basic "Speak friend and enter";<br></p>
<p><span>    auth_basic_user_file "/etc/nginx/htpasswd";</span></p>
<p><span></span><br></p>
<p><span>    # Make sure we don't share any Git repos just in case</span></p>
<p><span>    location ~ /\.git {</span></p>
<p><span>        deny all;</span></p>
<p><span>    }</span></p>
<p><span></span><br></p>
<p><span>    location /robots.txt {</span></p>
<p><span>        root /usr/share/nginx/www;</span></p>
<p><span>    }</span></p>
<p><span></span><br></p>
<p><span>    location /artifacts/ {</span></p>
<p><span>        root /var/buildsys/build-server/master/;</span></p>
<p><span>        autoindex on;</span></p>
<p><span>    }</span></p>
<p><span></span><br></p>
<p><span>    # Based on <a href="http://docs.buildbot.net/latest/manual/cfg-www.html#reverse-proxy-configuration" target="_blank">http://docs.buildbot.net/latest/manual/cfg-www.html#reverse-proxy-configuration</a></span></p>
<p><span>    location /buildbot/ {</span></p>
<p><span>            proxy_pass <a href="http://localhost:8020/" target="_blank">http://localhost:8020/</a>;</span></p>
<p><span>    }</span></p>
<p><span>    location /buildbot/sse/ {</span></p>
<p><span>        # proxy buffering will prevent sse to work</span></p>
<p><span>        proxy_buffering off;</span></p>
<p><span>        proxy_pass <a href="http://localhost:8020/sse/" target="_blank">http://localhost:8020/sse/</a>;</span></p>
<p><span>    }</span></p>
<p><span>    # required for websocket</span></p>
<p><span>    location /buildbot/ws {</span></p>
<p><span>        proxy_http_version 1.1;</span></p>
<p><span>        proxy_set_header Upgrade $http_upgrade;</span></p>
<p><span>        proxy_set_header Connection "upgrade";</span></p>
<p><span>        proxy_pass <a href="http://localhost:8020/ws" target="_blank">http://localhost:8020/ws</a>;</span></p>
<p><span>        # raise the proxy timeout for the websocket</span></p>
<p><span>        proxy_read_timeout 6000s;</span></p>
<p><span>    }</span></p>
<p><span>}</span></p>
<p><span>~                             </span></p></div><div><br></div></div></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 24, 2015 at 1:01 PM, Pierre Tardy <span dir="ltr"><<a href="mailto:tardyp@gmail.com" target="_blank">tardyp@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Martin,<div><br></div><div>It is currently not possible to create this configuration. I would not expect it to be difficult to implement.</div><div><br></div><div>Also it is recommended indeed to use nginx in reverse proxy mode, but you have to take care of properly configuring it.</div><div><a href="http://docs.buildbot.net/latest/manual/cfg-www.html#reverse-proxy-configuration" target="_blank">http://docs.buildbot.net/latest/manual/cfg-www.html#reverse-proxy-configuration</a><br></div><div><br></div><div>Pierre</div></div><br><div class="gmail_quote"><div><div><div dir="ltr">Le lun. 23 nov. 2015 à 10:38, Martin Vilcans <<a href="mailto:martin@librador.com" target="_blank">martin@librador.com</a>> a écrit :<br></div></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">Hi,<div><br></div><div>I'm trying to add authorization to Buildbot's read-only web UI in 0.9.0b5.</div><div><br></div><div>First I did this with Nginx configured as a reverse proxy, but I didn't get it to proxy the websockets, so I enabled authentication in the www configuration. But I have found no way to disallow read-only access to unauthenticated users. Is it possible?<br clear="all"><div><br></div>-- <br><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Martin Vilcans, game, web and software developer<div><a href="mailto:martin@librador.com" target="_blank">E-mail</a> <a href="http://www.librador.com/" style="font-size:12.8000001907349px" target="_blank">Blog</a><span style="font-size:12.8000001907349px"> </span><a href="http://www.twitter.com/vilcans" style="font-size:12.8000001907349px" target="_blank">Twitter</a><span style="font-size:12.8000001907349px"> <a href="https://github.com/vilcans" target="_blank">Github</a> <a href="https://www.linkedin.com/in/vilcans" target="_blank">LinkedIn</a></span></div><div><a href="http://www.resolutiongames.com" style="font-size:12.8000001907349px" target="_blank">Resolution Games</a><span style="font-size:12.8000001907349px"> </span><a href="http://www.screenplain.com" style="font-size:12.8000001907349px" target="_blank">Screenplain</a></div></div></div></div></div></div></div>
</div></div></div></div>
_______________________________________________<br>
users mailing list<br>
<a href="mailto:users@buildbot.net" target="_blank">users@buildbot.net</a><br>
<a href="https://lists.buildbot.net/mailman/listinfo/users" rel="noreferrer" target="_blank">https://lists.buildbot.net/mailman/listinfo/users</a></blockquote></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Martin Vilcans, game, web and software developer<div><a href="mailto:martin@librador.com" target="_blank">E-mail</a> <a href="http://www.librador.com/" style="font-size:12.8000001907349px" target="_blank">Blog</a><span style="font-size:12.8000001907349px"> </span><a href="http://www.twitter.com/vilcans" style="font-size:12.8000001907349px" target="_blank">Twitter</a><span style="font-size:12.8000001907349px"> <a href="https://github.com/vilcans" target="_blank">Github</a> <a href="https://www.linkedin.com/in/vilcans" target="_blank">LinkedIn</a></span></div><div><a href="http://www.resolutiongames.com" style="font-size:12.8000001907349px" target="_blank">Resolution Games</a><span style="font-size:12.8000001907349px"> </span><a href="http://www.screenplain.com" style="font-size:12.8000001907349px" target="_blank">Screenplain</a></div></div></div></div></div></div></div>
</div>
</div></div><br>_______________________________________________<br>
users mailing list<br>
<a href="mailto:users@buildbot.net" target="_blank">users@buildbot.net</a><br>
<a href="https://lists.buildbot.net/mailman/listinfo/users" rel="noreferrer" target="_blank">https://lists.buildbot.net/mailman/listinfo/users</a><br></blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Martin Vilcans, game, web and software developer<div><a href="mailto:martin@librador.com" target="_blank">E-mail</a> <a href="http://www.librador.com/" style="font-size:12.8000001907349px" target="_blank">Blog</a><span style="font-size:12.8000001907349px"> </span><a href="http://www.twitter.com/vilcans" style="font-size:12.8000001907349px" target="_blank">Twitter</a><span style="font-size:12.8000001907349px"> <a href="https://github.com/vilcans" target="_blank">Github</a> <a href="https://www.linkedin.com/in/vilcans" target="_blank">LinkedIn</a></span></div><div><a href="http://www.resolutiongames.com" style="font-size:12.8000001907349px" target="_blank">Resolution Games</a><span style="font-size:12.8000001907349px"> </span><a href="http://www.screenplain.com" style="font-size:12.8000001907349px" target="_blank">Screenplain</a></div></div></div></div></div></div></div>
</div>
</blockquote></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Martin Vilcans, game, web and software developer<div><a href="mailto:martin@librador.com" target="_blank">E-mail</a> <a href="http://www.librador.com/" style="font-size:12.8000001907349px" target="_blank">Blog</a><span style="font-size:12.8000001907349px"> </span><a href="http://www.twitter.com/vilcans" style="font-size:12.8000001907349px" target="_blank">Twitter</a><span style="font-size:12.8000001907349px"> <a href="https://github.com/vilcans" target="_blank">Github</a> <a href="https://www.linkedin.com/in/vilcans" target="_blank">LinkedIn</a></span></div><div><a href="http://www.resolutiongames.com" style="font-size:12.8000001907349px" target="_blank">Resolution Games</a><span style="font-size:12.8000001907349px"> </span><a href="http://www.screenplain.com" style="font-size:12.8000001907349px" target="_blank">Screenplain</a></div></div></div></div></div></div></div>
</div>