.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "NET-SERVER 1p" .TH NET-SERVER 1p "2023-06-11" "perl v5.36.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" net\-server \- Base Net::Server starting module .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& net\-server [base type] [net server arguments] \& \& net\-server PreFork ipv \*(Aq*\*(Aq \& \& net\-server HTTP \& \& net\-server HTTP app foo.cgi \& \& net\-server HTTP app foo.cgi app /=bar.cgi \& \& net\-server HTTP port 8080 port 8443/ssl ipv \*(Aq*\*(Aq server_type PreFork \-\-SSL_key_file=my.key \-\-SSL_cert_file=my.crt access_log_file STDERR .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" The net-server program gives a simple way to test out code and try port connection parameters. Though the running server can be robust enough for production, it is anticipated that this binary will just be used for basic testing of net-server ports, acting as a simple echo server, or for running development scripts as \s-1CGI.\s0 .SH "OPTIONS" .IX Header "OPTIONS" .ie n .IP """base type""" 4 .el .IP "\f(CWbase type\fR" 4 .IX Item "base type" The very first argument may be a Net::Server flavor. This is given as shorthand for writing out server_type \*(L"ServerFlavor\*(R". Additionally, this allows types such as \s-1HTTP\s0 and \s-1PSGI,\s0 which are not true Net::Server base types, to subclass other server types via an additional server_type argument. .Sp .Vb 1 \& net\-server PreFork \& \& net\-server HTTP # becomes a HTTP server in the Fork flavor \& \& net\-server HTTP server_type PreFork # preforking HTTP server .Ve .ie n .IP """port""" 4 .el .IP "\f(CWport\fR" 4 .IX Item "port" Port to bind upon. Default is 80 if running a \s-1HTTP\s0 server as root, 8080 if running a \s-1HTTP\s0 server as non-root, or 20203 otherwise. .Sp Multiple value can be given for binding to multiple ports. All of the methods for specifying port attributes enumerated in Net::Server and Net::Server::Proto are available here. .Sp .Vb 1 \& net\-server port 20201 \& \& net\-server port 20202 \& \& net\-server port 20203/IPv6 .Ve .ie n .IP """host""" 4 .el .IP "\f(CWhost\fR" 4 .IX Item "host" Host to bind to. Default is *. Will bind to an IPv4 socket if an IPv4 address is given. Will bind to an IPv6 socket if an IPv6 address is given (requires installation of IO::Socket::INET6). .Sp If a hostname is given and \f(CW\*(C`ipv\*(C'\fR is still set to 4, an IPv4 socket will be created. If a hostname is given and \f(CW\*(C`ipv\*(C'\fR is set to 6, an IPv6 socket will be created. If a hostname is given and \f(CW\*(C`ipv\*(C'\fR is set to * (default), a lookup will be performed and any available IPv4 or IPv6 addresses will be bound. The \f(CW\*(C`ipv\*(C'\fR parameter can be set directly, or passed along in the port, or additionally can be passed as part of the hostname. .Sp .Vb 1 \& net\-server host localhost \& \& net\-server host localhost/IPv4 .Ve .PP There are many more options available. Please see the Net::Server documentation. .SH "AUTHOR" .IX Header "AUTHOR" .Vb 1 \& Paul Seamons .Ve .SH "LICENSE" .IX Header "LICENSE" This package may be distributed under the terms of either the .PP .Vb 3 \& GNU General Public License \& or the \& Perl Artistic License .Ve