<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 class="">scripts.js?_1445513624809:14 ReconnectingWebSocket onerror ws://redacted/buildbot/ws Event {isTrusted: true}</p><p class="">scripts.js?_1445513624809:14 ReconnectingWebSocket attempt-connect ws://redacted/buildbot/ws</p><p class="">scripts.js?_1445513624809:14 ReconnectingWebSocket connection-timeout ws://redacted/buildbot/ws</p><p class="">scripts.js?_1445513624809:14 WebSocket connection to 'ws://redacted/buildbot/ws' failed: WebSocket is closed before the connection is established.</p><p class="">scripts.js?_1445513624809:14 ReconnectingWebSocket onerror ws://redacted/buildbot/ws Event {isTrusted: true}</p><p class="">scripts.js?_1445513624809:14 ReconnectingWebSocket attempt-connect ws://redacted/buildbot/ws</p><p class="">scripts.js?_1445513624809:14 ReconnectingWebSocket connection-timeout ws://redacted/buildbot/ws</p><p class="">scripts.js?_1445513624809:14 WebSocket connection to 'ws://redacted/buildbot/ws' failed: WebSocket is closed before the connection is established.</p><p class="">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 class=""><span class="">server {</span></p>
<p class="">    auth_basic "Speak friend and enter";<br></p>
<p class=""><span class="">    auth_basic_user_file "/etc/nginx/htpasswd";</span></p>
<p class=""><span class=""></span><br></p>
<p class=""><span class="">    # Make sure we don't share any Git repos just in case</span></p>
<p class=""><span class="">    location ~ /\.git {</span></p>
<p class=""><span class="">        deny all;</span></p>
<p class=""><span class="">    }</span></p>
<p class=""><span class=""></span><br></p>
<p class=""><span class="">    location /robots.txt {</span></p>
<p class=""><span class="">        root /usr/share/nginx/www;</span></p>
<p class=""><span class="">    }</span></p>
<p class=""><span class=""></span><br></p>
<p class=""><span class="">    location /artifacts/ {</span></p>
<p class=""><span class="">        root /var/buildsys/build-server/master/;</span></p>
<p class=""><span class="">        autoindex on;</span></p>
<p class=""><span class="">    }</span></p>
<p class=""><span class=""></span><br></p>
<p class=""><span class="">    # Based on <a href="http://docs.buildbot.net/latest/manual/cfg-www.html#reverse-proxy-configuration">http://docs.buildbot.net/latest/manual/cfg-www.html#reverse-proxy-configuration</a></span></p>
<p class=""><span class="">    location /buildbot/ {</span></p>
<p class=""><span class="">            proxy_pass <a href="http://localhost:8020/">http://localhost:8020/</a>;</span></p>
<p class=""><span class="">    }</span></p>
<p class=""><span class="">    location /buildbot/sse/ {</span></p>
<p class=""><span class="">        # proxy buffering will prevent sse to work</span></p>
<p class=""><span class="">        proxy_buffering off;</span></p>
<p class=""><span class="">        proxy_pass <a href="http://localhost:8020/sse/">http://localhost:8020/sse/</a>;</span></p>
<p class=""><span class="">    }</span></p>
<p class=""><span class="">    # required for websocket</span></p>
<p class=""><span class="">    location /buildbot/ws {</span></p>
<p class=""><span class="">        proxy_http_version 1.1;</span></p>
<p class=""><span class="">        proxy_set_header Upgrade $http_upgrade;</span></p>
<p class=""><span class="">        proxy_set_header Connection "upgrade";</span></p>
<p class=""><span class="">        proxy_pass <a href="http://localhost:8020/ws">http://localhost:8020/ws</a>;</span></p>
<p class=""><span class="">        # raise the proxy timeout for the websocket</span></p>
<p class=""><span class="">        proxy_read_timeout 6000s;</span></p>
<p class=""><span class="">    }</span></p>
<p class=""><span class="">}</span></p>
<p class=""><span class="">~                             </span></p></div><div><br></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 class="h5"><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 class="h5"><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 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>