TLDR: I'm trying to reverse proxy a web-app through Nginx and it isn't passing through as it should.


server {
    listen 80;
    server_name dns.example.com;
    access_log logs/dns.access.log main;

    index index.php index.html;

    location / {
        root /var/www/com.example.dns;

docker: https://hub.docker.com/r/jpillora/dnsmasq/~/dockerfile/

appication: https://github.com/jpillora/webproc

if I connect directly (http://localnetwork.lan:5380) it works like a charm. If I connect via the reverse proxy (http://dns.example.com/) the images show up but not the active parts.

What am I missing? How can I proxy_pass the application through?

  • 1
    One of the HTTP endpoints is apparently a Websocket. You may need to configure nginx for that. Check the browser console to learn more about what is failing. – Daniel B Jan 10 '18 at 8:45

Add an error_log directive so that nginx can tell you what is wrong. Make sure the ngx_http_proxy_module has been enabled.


Daniels comment put me in the right direction: Websockets and "upgrade" to 1.1


location /wsapp/ {
    proxy_pass http://wsbackend;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.