Caddy: Bind to Unix socket

Created on 5 Jun 2018  路  4Comments  路  Source: caddyserver/caddy

I'd like to request the feature to bind to unix sockets.

Technical background for this feature request:

  • Master Caddy-server handling SSL-certificates running under www-data, connecting to unix sockets as proxies
  • Per-User Caddy-instances running under the user account with sockets being accessible to www-data:www-data

Following things would be great for bind configuration:

bind <host>

Binds to TCP

bind unix://path : umask

Binds to Unix path with owner being user:group with permission umask. This feature is only available to Unix-like systems as Windows does not allow sockets.

Using Unix sockets should automatically disable all HTTPS-functionality.

As I'm not comfortable with Go I cannot add this functionality by myself.

feature request

Most helpful comment

Binding to unix socket is possible with Caddy 2.

All 4 comments

There are actually 2 main parts here:

  1. Using Caddy as a client. For example, dialing into a Unix socket
  2. Start a Caddy server instance and bind to Unix Domain Socket

Is this what you're looking for? https://caddyserver.com/docs/net

It's not actually the same as Unix Domain Sockets bind with permissions also. But the approach to have a host or server directive is flexible as it will allow binding to different types of connections.

Binding to unix socket is possible with Caddy 2.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jgsqware picture jgsqware  路  3Comments

SteffenDE picture SteffenDE  路  3Comments

aeroxy picture aeroxy  路  3Comments

kilpatty picture kilpatty  路  3Comments

billop picture billop  路  3Comments