FastCGI over Unix socket #4465

Closed
opened 2025-11-02 05:51:48 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @clarfonthey on GitHub (Dec 8, 2019).

  • Gitea version (or commit ref): Gitea version 1.9.3 built with go1.13.1
  • Git version: git version 2.23.0
  • Operating system: OpenBSD 6.6 GENERIC.MP#0 amd64

Description

Right now, setting PROTOCOL = fcgi allows FCGI over TCP only, which is a bit odd, considering how FastCGI is something that's usually only run locally. If HTTP_ADDR is set to a path for a unix socket, Gitea will error stating that the address is unknown (because it's not actually a hostname).

Because OpenBSD's httpd does not allow full HTTP proxying and only FastCGI, using a unix socket is not possible with this configuration.

This would be a breaking change, but I would personally recommend renaming the unix protocol to unix+http and adding an additional unix+fcgi protocol as well.

Ideally, using the unix protocol without specifying which would emit a warning.

Originally created by @clarfonthey on GitHub (Dec 8, 2019). - Gitea version (or commit ref): `Gitea version 1.9.3 built with go1.13.1` - Git version: `git version 2.23.0` - Operating system: `OpenBSD 6.6 GENERIC.MP#0 amd64` ## Description Right now, setting `PROTOCOL = fcgi` allows FCGI over TCP only, which is a bit odd, considering how FastCGI is something that's usually only run locally. If `HTTP_ADDR` is set to a path for a unix socket, Gitea will error stating that the address is unknown (because it's not actually a hostname). Because OpenBSD's httpd does not allow full HTTP proxying and only FastCGI, using a unix socket is not possible with this configuration. This would be a breaking change, but I would personally recommend renaming the `unix` protocol to `unix+http` and adding an additional `unix+fcgi` protocol as well. Ideally, using the `unix` protocol without specifying which would emit a warning.
GiteaMirror added the type/feature label 2025-11-02 05:51:48 -06:00
Author
Owner

@zeripath commented on GitHub (Dec 8, 2019):

I think it would be easiest just to use fcgi+unix - then this doesn't need to be a breaking change.

@zeripath commented on GitHub (Dec 8, 2019): I think it would be easiest just to use `fcgi+unix` - then this doesn't need to be a breaking change.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#4465