1NET-SERVER(1)         User Contributed Perl Documentation        NET-SERVER(1)
2
3
4

NAME

6       net-server - Base Net::Server starting module
7

SYNOPSIS

9           net-server [base type] [net server arguments]
10
11           net-server PreFork ipv '*'
12
13           net-server HTTP
14
15           net-server HTTP app foo.cgi
16
17           net-server HTTP app foo.cgi app /=bar.cgi
18
19           net-server HTTP port 8080 port 8443/ssl ipv '*' server_type PreFork --SSL_key_file=my.key --SSL_cert_file=my.crt access_log_file STDERR
20

DESCRIPTION

22       The net-server program gives a simple way to test out code and try port
23       connection parameters.  Though the running server can be robust enough
24       for production, it is anticipated that this binary will just be used
25       for basic testing of net-server ports, acting as a simple echo server,
26       or for running development scripts as CGI.
27

OPTIONS

29       "base type"
30           The very first argument may be a Net::Server flavor.  This is given
31           as shorthand for writing out server_type "ServerFlavor".
32           Additionally, this allows types such as HTTP and PSGI, which are
33           not true Net::Server base types, to subclass other server types via
34           an additional server_type argument.
35
36               net-server PreFork
37
38               net-server HTTP  # becomes a HTTP server in the Fork flavor
39
40               net-server HTTP server_type PreFork  # preforking HTTP server
41
42       "port"
43           Port to bind upon.  Default is 80 if running a HTTP server as root,
44           8080 if running a HTTP server as non-root, or 20203 otherwise.
45
46           Multiple value can be given for binding to multiple ports.  All of
47           the methods for specifying port attributes enumerated in
48           Net::Server and Net::Server::Proto are available here.
49
50               net-server port 20201
51
52               net-server port 20202
53
54               net-server port 20203/IPv6
55
56       "host"
57           Host to bind to.  Default is *.  Will bind to an IPv4 socket if an
58           IPv4 address is given.  Will bind to an IPv6 socket if an IPv6
59           address is given (requires installation of IO::Socket::INET6).
60
61           If a hostname is given and "ipv" is still set to 4, an IPv4 socket
62           will be created.  If a hostname is given and "ipv" is set to 6, an
63           IPv6 socket will be created.  If a hostname is given and "ipv" is
64           set to * (default), a lookup will be performed and any available
65           IPv4 or IPv6 addresses will be bound.  The "ipv" parameter can be
66           set directly, or passed along in the port, or additionally can be
67           passed as part of the hostname.
68
69               net-server host localhost
70
71               net-server host localhost/IPv4
72
73       There are many more options available.  Please see the Net::Server
74       documentation.
75

AUTHOR

77           Paul Seamons <paul@seamons.com>
78

LICENSE

80       This package may be distributed under the terms of either the
81
82         GNU General Public License
83           or the
84         Perl Artistic License
85
86
87
88perl v5.38.0                      2023-07-21                     NET-SERVER(1)
Impressum