~aw/mygit#27: 
how to practically set up an instance

For example I currently have a single domain and a server with a single public IPv4 address (multiple IPv6's, but thats not quite so well supported on the client side). Also I already run a website on the server, so just running mygit on port 80 is not an option, and routing a subdomain to another IP is also not.

Both gitweb and cgit are using the Common Gateway Interface instead of running a full web server themselves. This would alleviate the problem of supporting HTTPS.

On the other hand, I could also simply set up the already running web server as a reverse proxy to mygit running on a different port. The two most common servers Apache and Nginx support this, probably others too. I think this could also solve the HTTPS problem.

I am not sure of the dis/advantages of these two approaches, and maybe I have missed another one.

Installation instructions or recommendations could be nice to have too.

Status
REPORTED
Submitter
Johann Galle
Assigned to
No-one
Submitted
6 months ago
Updated
6 months ago
Labels
No labels applied.

~aw 6 months ago

Hi Johann, the idea is to set up a reverse proxy. I don’t think mygit is ready for production (in fact there are open path traversal security bugs — so I would not try deploying it!) but when it is I will put together more thorough instructions.

I also plan on modifying the config so you could run it from say alexwennerberg.com/git instead of git.alexwennerberg.com — i believe that would solve your issue

Alex

On Mar 18, 2021, at 9:49 AM, Johann Galle outgoing@sr.ht wrote:

For example I currently have a single domain and a server with a single public IPv4 address (multiple IPv6's, but thats not quite so well supported on the client side). Also I already run a website on the server, so just running mygit on port 80 is not an option, and routing a subdomain to another IP is also not.

Both gitweb and cgit are using the Common Gateway Interface instead of running a full web server themselves. This would alleviate the problem of supporting HTTPS.

On the other hand, I could also simply set up the already running web server as a reverse proxy to mygit running on a different port. The two most common servers Apache and Nginx support this, probably others too. I think this could also solve the HTTPS problem.

I am not sure of the dis/advantages of these two approaches, and maybe I have missed another one.

Installation instructions or recommendations could be nice to have too.

-- View on the web: https://todo.sr.ht/~aw/mygit/27

Johann Galle 6 months ago · edit

On 18.03.2021 17:57, Alex Wennerberg wrote:

Hi Johann, the idea is to set up a reverse proxy. I don’t think mygit is ready for production (in fact there are open path traversal security bugs — so I would not try deploying it!) but when it is I will put together more thorough instructions.

I am not planning on deploying it right now, just wanted to plan ahead before we're too much committed to using a full server. I wasn't sure that a server was the best solution, but I think with reverse proxy it should be just as good as CGI.

Register here or Log in to comment, or comment via email.