--- Log opened Thu Sep 24 00:00:50 2009
09:50 < McManiaC> hi
09:50 < McManiaC> is there a way to drop root user to user x after binding port 80 with happstack?
11:20 < mmmdonuts> McManiaC: how are you becoming root?  how are you running happstack?
11:21 < mightybyte> mmmdonuts: I would assume he's running happstack as root so he can bind to port 80.
11:22 < McManiaC> mightybyte: exactly
11:22 < mightybyte> (that's what I do)
11:22 < McManiaC> so you just keep on running as root?
11:22 < mightybyte> Yeah
11:23 < McManiaC> hm :S
11:23 < mightybyte> I don't know anything about dropping privileges, so I can't answer your actual question...but I just don't worry about running as root.
11:26 < burp> you might try some setuid stuff
11:26 < burp> after starting the server
11:27 < burp> maybe there is something in system.posix
11:28 < mmmdonuts> Ideally, happstack itself should do this, after it's bound the port.
11:29 < McManiaC> hm i get a 404 on http://hackage.haskell.org/packages/archive/base/4.1.0.0/doc/html/System-Posix-Internals.html :S
11:30 < mightybyte> McManiaC: Alternatively, you could run happstack on a high port and proxy with apache or something else.
11:33 < McManiaC> :S
11:34 < burp> I do it like this
11:34 < burp> because serving static files from happstack isn't optimal anyway
11:35 < burp> http://haskell.org/ghc/docs/latest/html/libraries/unix/System-Posix-User.html
11:36 < burp> there it is, setUserID
11:38 < burp> and it works
11:38 < McManiaC> why isnt it optimal burp ?
11:38 < McManiaC> and thx for the link :)
11:38 < burp> I guess it's much slower
11:39 < burp> these webservers are highly optimized
11:39 < burp> especially if you take such ones as cherokee,nginx,lighttpd
11:40 < McManiaC> how do you call happstack then?
11:40 < burp> I use reverse proxying from apache/cherokee
11:41 < burp> redirect requests to localhost:happstackport where for happstack runs
11:41 < burp> for specific parts/paths
11:41 < McManiaC> ok
11:41 < burp> it's no significant overhead
11:42 < McManiaC> ok :)
11:43 < McManiaC> i'll take a look on how to do so with lighttpd then
11:46 < burp> more interesting for me is how to bind to a specific ip address
11:52 < McManiaC> use headers?
11:52 < McManiaC> in your control.hs
11:53 < burp> I mean the ip address which simpleHTTP listens on
11:56 < McManiaC> huh?
11:57 < McManiaC> http://ix.io/jL/hs sth like that?
11:59 < burp> nope, but never mind :>
17:32 < McManiaC> http://ix.io/jT/hs is such a header "normal" for a state module?
17:34 < aavogt> McManiaC: I'm not sure you need the undecidable instances
17:34 < aavogt> but other than that, it is pretty normal
17:34 < McManiaC> whats it good for? ^^
17:34 < McManiaC> and what is http://ix.io/jS trying to tell me?
17:34 < aavogt> which extension? (they are documented pretty well in the ghc manual)
17:35 < McManiaC> http://ix.io/jU/hs my data definitions
17:35 < aavogt> @type 1 :: (Num a, Num a) => a
17:35 < lambdabot> forall a. (Num a) => a
17:37 < aavogt> McManiaC: does it work if you declare the Version instance before the deriveSerialize?
17:37 < aavogt> the order of top-level stuff matters in template haskell
17:38 < McManiaC> well its just a warning so i guess it should work, but no, it doesnt change anything
17:44 < McManiaC> hmmm
17:53 < McManiaC> ok this seems to be coming from "type ID = String"
17:53 < McManiaC> how do you work with type and $(deriveAll ..) ?
18:03 < aavogt> don't use type?
18:03 < aavogt> use a newtype
18:03 < aavogt> have you taken a look at IxSet?
18:32 < McManiaC> no
18:41 < aavogt> it makes you use newtypes
19:13 < McManiaC> http://ix.io/jW/ its working :))
--- Log closed Fri Sep 25 00:00:51 2009