Gitea: Use caddy as the main server

Created on 13 May 2017  路  12Comments  路  Source: go-gitea/gitea

I think Caddy could be used for the main part of the server. Gitea would listen on a different port on localhost, and Caddy would listen on the main port chosen by the user. This would allow us to do more complex things easier such as:

  1. Automatic HTTPS with Let's Encrypt
  2. Redirect HTTP to HTTPS
  3. Gitea pages on a separate domain
  4. Separate domain for raw files
  5. Redirect old URLs
  6. Set timeouts
  7. Listen on multiple domains and IPs

Many of the issues listed above could be fixed very easily if we integrate Caddy into Gitea.

kinproposal

Most helpful comment

I think that it is not the role of gitea to handle all of specific frontend config. For exemple in gitea-infrastructure we use traefik and we should let that choice to user for setting inside is own env. gitea should only offer a simple http interface maybe some additional sugary but we should keep it simple.

All 12 comments

I will integrate Let's Encrypt with multiple domains and redirect HTTP to HTTPS.

As long as it's optional, I use nginx for everything on my server and would like to keep it how it is right now with Gitea behind nginx. Besides, I don't really understand the need for all of this in Gitea.

I think that it is not the role of gitea to handle all of specific frontend config. For exemple in gitea-infrastructure we use traefik and we should let that choice to user for setting inside is own env. gitea should only offer a simple http interface maybe some additional sugary but we should keep it simple.

What about http/2? (For which you would need a secure connection over https)

Just make gitea a caddy-plugin :trollface:

+1

@sapk I see this more as an optional choice. Add it to the documentation, support it.
Especially Gitea Pages is very important to me and a fundamental benefit to Github.
They offer only support for Jekkyl, one of some hundred of static site generators.
Open source is all about easy access, otherwise is it just hypocrisy.
Caddy offers https for everyone, in a very simple way. This means a secure internet connection and easy webpages for everyone. I think this is a great idea.

We could describe how to use caddy and gitea side by side to work like github pages that not that difficult and everything needed is allready here. Just use the git plugin of caddy to pull changes and execute a command (hugo, jekyll or otherq) if needed.

Github pages work only with Jekkyl. Gitlab pages offer support for more. I am for IPFS anyway:

It is a distributed peer-to-peer network, which offers the hosting of static sites:

https://ipfs.io/
https://ipfs.io/ipfs/QmdPtC3T7Kcu9iJg6hYzLBWR5XCDcYMY7HV685E3kH3EcS/2015/09/15/hosting-a-website-on-ipfs/

I agree on using nginx/http for the web server and configs

I'm very interested in this discussion... not so much because of caddy... but on what this discussion implies.

Is Gitea going to try to do it all... or is Gitea going to do one thing and rely on integration options for the non-core stuff...

Seems to me that a product like Gitea should focus on the core: git repo management, issues and wiki and rely on proper documentation and integration options for the other stuff. That would be my hope anyway.

Open source is about choice. Stuffing everything into Gitea, creating a big monolithic application in the process, would be horrible.

Closing as caddy in front of Gitea currently works.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  3Comments

adpande picture adpande  路  3Comments

jakimfett picture jakimfett  路  3Comments

thehowl picture thehowl  路  3Comments

lunny picture lunny  路  3Comments