Clarifying documentation on listen ips
svn: r15235
This commit is contained in:
parent
ddf895c5cf
commit
de07390d84
|
@ -25,6 +25,7 @@ web-server/insta
|
|||
]
|
||||
|
||||
And press @onscreen["Run"]. A Web browser will open up showing your new servlet.
|
||||
This servlet will only be accessible from your local machine.
|
||||
|
||||
Behind the scenes, DrScheme has used @scheme[serve/servlet] to start a new server
|
||||
that uses your @scheme[start] function as the servlet.
|
||||
|
|
|
@ -63,7 +63,10 @@ These functions optimize the construction of dispatchers and launching of server
|
|||
|
||||
If @scheme[banner?] is true, then a banner is printed informing the user of the server's URL.
|
||||
|
||||
The server listens on @scheme[listen-ip] and port @scheme[port].
|
||||
The server listens on @scheme[listen-ip] and port @scheme[port]. If @scheme[listen-ip] is @scheme[#f], then the server accepts
|
||||
connections to all of the listening machine's addresses. Otherwise, the server accepts connections only at the interface(s) associated with the given string.
|
||||
For example, providing @scheme["127.0.0.1"] (the default) as @scheme[listen-ip] creates a server that accepts only connections to @scheme["127.0.0.1"] (the loopback interface) from the local machine.
|
||||
|
||||
|
||||
If @scheme[ssl-key] and @scheme[ssl-cert] are not false, then the server runs in HTTPS mode with @scheme[ssl-cert]
|
||||
and @scheme[ssl-key] as paths to the certificate and private key.
|
||||
|
|
|
@ -39,6 +39,12 @@ Suppose you'd like to change the port to something else, change the last line to
|
|||
#:port 8080)
|
||||
]
|
||||
|
||||
Suppose you want to accept connections from external machines:
|
||||
@schemeblock[
|
||||
(serve/servlet my-app
|
||||
#:listen-ip #f)
|
||||
]
|
||||
|
||||
By default the URL for your servlet is @filepath{http://localhost:8000/servlets/standalone.ss},
|
||||
suppose you wanted it to be @filepath{http://localhost:8000/hello.ss}:
|
||||
@schemeblock[
|
||||
|
@ -155,7 +161,9 @@ and if @scheme[serve/servlet] is run in another module.
|
|||
|
||||
Advanced users may need the following options:
|
||||
|
||||
The server listens on @scheme[listen-ip] and port @scheme[port].
|
||||
The server listens on @scheme[listen-ip] and port @scheme[port]. If @scheme[listen-ip] is @scheme[#f], then the server accepts
|
||||
connections to all of the listening machine's addresses. Otherwise, the server accepts connections only at the interface(s) associated with the given string.
|
||||
For example, providing @scheme["127.0.0.1"] (the default) as @scheme[listen-ip] creates a server that accepts only connections to @scheme["127.0.0.1"] (the loopback interface) from the local machine.
|
||||
|
||||
If @scheme[ssl-cert] and @scheme[ssl-key] are not false, then the server runs in HTTPS mode with @scheme[ssl-cert]
|
||||
and @scheme[ssl-key] as the certificates and private keys.
|
||||
|
|
Loading…
Reference in New Issue
Block a user