gos
github.com/leeview/goscgi
go get github.com/leeview/goscgi
gos

github.com/leeview/goscgi

SimpleCGI protocol implementation for Go. Allows creation of a basic HTTP server if used with Nginx or other SCGI capable web server.

by unknownv0.0.0-20210922125529-5ee3815bb8d1 (see all)License:BSD-2-Clause
go get github.com/leeview/goscgi
Readme

goscgi

SimpleCGI protocol implementation for Go lang. Allows creation of a basic HTTP server if used with Nginx or other SCGI capable web server.

Nginx configuration

Locate Nginx configuration file. In Ubuntu it may be located at /etc/nginx/sites-enabled/default. Add scgi_pass & include scgi_params directives in the root location.

location / {
    scgi_pass 127.0.0.1:8080;
    #scgi_pass unix:/tmp/goscgi.socket;
    include scgi_params;
}

If you use unix sockets, don't forget to give write permission to www-data (default nginx user) on the socket file (created at runtime). The examples below, use tcp sockets and don't need any special treatment. Save the config file & restart the Nginx service. In Ubuntu: sudo service nginx restart.

Usage

See goscgi/benchmarks/test/main.go.

GitHub Stars

11

LAST COMMIT

8mos ago

MAINTAINERS

0

CONTRIBUTORS

2

OPEN ISSUES

0

OPEN PRs

0
VersionTagPublished
v0.0.0-20210922125529-5ee3815bb8d1
6mos ago
v0.0.0-20130407001511-32e83454ba68
2yrs ago
No alternatives found
No tutorials found
Add a tutorial