> On Mar 10, 2016, at 12:46 PM, 'John Clements' via Racket Users > <racket-users@googlegroups.com> wrote: > > >> On Mar 10, 2016, at 12:26 PM, Marc Kaufmann <marc.kaufman...@gmail.com> >> wrote: >> >> Hi, >> >> tl;dr : What is the 'best' way to start and stop a web server? Is there a >> "racket-server die" or similar command which does not use 'kill’? > > The web server is a standard process, not daemonized or doing anything > strange, so it should be possible to stop it like you stop any other process. > > 1) You can run it in the foreground of a terminal window, and hit Ctrl-C to > kill it. > 2) You can ‘kill’ it *without* root privileges; just run `kill <process-id>`. > 3) You can use something robust to keep it running; I personally use djb’s > daemontools, so I can up it with ‘svc -u myserver’ and down it with ‘svc -d > myserver’.
Sorry, I’m an idiot, and didn’t read carefully. I personally wouldn’t recommend running the web-server with root privileges. I personally use an apache server to reverse-proxy requests to a higher port. Naturally, you’d need privileges to set this up. Frankly, I’m a bit surprised that your admin is willing to allow you to run the server as root… that seems like a bigger hole than allowing you to kill processes. If proxying isn’t appealing, I’m guessing that you can drop privileges after connecting to ports 80 and 443, though I can see how that might be icky. John > > John > >> >> Some background: >> >> I am finally deploying lists of spaghetti-code (aka my website) to a real >> web server. I do not have the permissions to do 'sudo kill racket' on this >> server (and won't get them), which made me realize that possibly it is a >> dumb way to shut the server down like this. >> >> In case you are wondering why I start the server with root privileges, it >> seems that I need those to listen to ports 80 and 443. >> >> I know that I can set an option so that the '/quit' URL shuts down the >> server, but then anyone can just shut it down, not just me. >> >> Cheers, >> Marc >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Racket Users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to racket-users+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. > > > > -- > You received this message because you are subscribed to the Google Groups > "Racket Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to racket-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.