Skip to content


config option to set listen address #10

infinity0 opened this Issue · 12 comments

7 participants


please add a config option to set the listen address - this would provide an easy way of setting up a private wiki over a lan or vpn


... or your very own localhost wiki


i've implemented this very quickly here

I don't know ANY haskell; i did this with various online references. it's ugly but it compiles and works, if you need this functionality right now.

the interface address is hard-coded into the source code. also, i have no idea what line 84 (listen sock 10) does - i'm guessing accept a maximum of 10 concurrent incoming connections.

someone with a better knowledge of haskell might want to make this a setting you can edit in the config file.


I have extended this a bit, the listen address is now configurable via command line option:


I needed this feature as well. tbh's patch works for me (thanks!)


Yes. I need this also and I'm using the tbh's patch (thanks too!).


Thanks, I've merged tbh's patch. I'll modify it later to allow setting the listen address in the config file, so I'm keeping this issue open to remind myself...


is the default supposed to be

$ gitit & 
$ netstat -ltnp | grep gitit
tcp        0      0*               LISTEN      17495/gitit     
$ gitit -l & 
$ netstat -ltnp | grep gitit
tcp        0      0  *               LISTEN      17503/gitit     

also ipv6 doesn't seem to work:

$ gitit -l ::1
gitit: user error (inet_addr: Malformed address: ::1)

(also, this brings up the bug that atm there's no way to listen on both IPv4 and IPv6)

$ gitit --version
gitit version 0.8 -plugins
Copyright (C) 2008 John MacFarlane
This is free software; see the source for copying conditions.  There is no
warranty, not even for merchantability or fitness for a particular purpose.

Yes, is the default. Do you think the default should be something else? As for ipv6, I don't know enough about the low-level networking libraries to fix this at the moment, but I'd happily accept a patch to improve things.


iirc the previous behaviour was to listen on, so it should remain the same? i think network daemons generally listen on that by default, and serving a public wiki is probably the most common use-case.

jgm commented

Right, I'll change the default to

I'd welcome a patch to fix ip6 and make it possible to listen on ip4 and ip6 simultaneously. tbh?


Did this make it to a config file option yet? I have "listen:" in the config file but gitit still bound to

@segasai segasai pushed a commit to segasai/gitit that referenced this issue
@jgm Don't allow files with ".page" extension to be uploaded.
Resolves Issue #10.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.