Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please support --listen /some/unix.sock on HTTP #672

Open
leonerd opened this issue Mar 29, 2022 · 2 comments
Open

Please support --listen /some/unix.sock on HTTP #672

leonerd opened this issue Mar 29, 2022 · 2 comments

Comments

@leonerd
Copy link

leonerd commented Mar 29, 2022

When running a FastCGI responder, we can simply

$ plackup -s FCGI --listen /some/path/to/unix.sock

to have it listen on a UNIX socket. The same is not true for the HTTP version:

$ plackup --listen /some/path/to/unix.sock
HTTP::Server::PSGI: Accepting connections at http://0:8080/

This then ends up binding to TCP port 8080, and not the UNIX path.

It'd be great to be able to support UNIX-hosted HTTP responders on fixed paths.

@leonerd leonerd changed the title Please support -s HTTP --listen /some/unix.sock Please support --listen /some/unix.sock on HTTP Mar 29, 2022
@skaji
Copy link
Contributor

skaji commented Mar 29, 2022

You may want to look at other PSGI servers, such as Starlet:

❯ plackup -s Starlet --listen unix.sock  -e 'sub { [200, [], ["ok"]] }'
Plack::Handler::Starlet: Accepting connections at http://0:unix.sock/

@leonerd
Copy link
Author

leonerd commented Mar 29, 2022

Also while there, don't forget to additionally account for chmod, the same issue as miyagawa/Starman#145

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants