Skip to content

[Resolved] Apache2 proxy server throught Unix Domain Socket to Node.JS http server process #1264

Closed
@reinaldorauch

Description

@reinaldorauch
  • Node.js Version: 9.11.1
  • OS: Debian 9.4 Linux 4.9.0-6-amd64 Update README for help #1 SMP Debian 4.9.82-1+deb9u3 (2018-03-02) x86_64 GNU/Linux
  • Scope (install, code, runtime, meta, other?): Runtime
  • Module (and version) (if relevant): HTTP

I have a nodejs server running with http and I want to it to listen to a Unix Domain Socket to bypass the host network stack to a proxy http server, apache2 in case.

It works fine until I make the apache2 server proxy the requests to the nodejs process throught the UDS because when I do that the proxy server returns 503 Service Unavailable. I checked the path for the socket (/tmp/tcu.sock) and it has the same user as the apache2 http proxy server (www-data) and I as root user can use curl (curl -XGET --unix-socket /tmp/tcu.sock http://tcu-api.tcentral.local/ping) to query the nodejs process and get the correct response.

I think it seems to be nodejs related as I runned the netstat --protocol=unix command and I didn't found the nodejs process listening to the socket and I'm sure that the nodejs process is running as I made it managed by systemd.

How I can resolve that?

Thanks for the attention.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions