> 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’.

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.

Reply via email to