Lines Matching +full:- +full:lp

5 It may be embedded into C/C++ host applications or used as a stand-alone
9 The stand-alone server is self-contained, and does not require any external
11 [Visual C++ Redistributable](http://www.microsoft.com/en-us/download/details.aspx?id=30679).
15 ----
17 On Windows, UNIX and Mac, the CivetWeb stand-alone executable may be started
24 Pressing `Ctrl-C` keys will stop the server.
27 Right-clicking on the icon pops up a menu, where it is possible to stop
33 to this folder, double-click the exe, and launch a browser at
54 All command line arguments must start with `-`.
57 `CivetWeb -document_root D:\web`. Then the `D:\web` directory will be served
62 Note that configuration options on the command line must start with `-`,
67 $ CivetWeb -listening_ports 1234 -document_root /var/www
77 CivetWeb -A <htpasswd_file> <realm> <user> <passwd>
81 ----
89 CivetWeb uses shell-like glob patterns for several configuration options,
110 the stand-alone executable as well as for applications embedding CivetWeb.
111 The stand-alone executable supports some additional options: see *Options from `main.c`*.
112 The options are explained in alphabetic order - for a quick start, check
116 Access-Control-Allow-Headers header field, used for cross-origin resource
117 sharing (CORS) pre-flight requests.
118 See the [Wikipedia page on CORS](http://en.wikipedia.org/wiki/Cross-origin_resource_sharing).
120 If set to an empty string, pre-flights will not allow additional headers.
121 If set to "*", the pre-flight will allow whatever headers have been requested.
122 If set to a comma separated list of valid HTTP headers, the pre-flight will return
127 Access-Control-Allow-Methods header field, used for cross-origin resource
128 sharing (CORS) pre-flight requests.
129 See the [Wikipedia page on CORS](http://en.wikipedia.org/wiki/Cross-origin_resource_sharing).
131 If set to an empty string, pre-flights will not be supported directly by the server,
132 but scripts may still support pre-flights by handling the OPTIONS method properly.
133 If set to "*", the pre-flight will allow whatever method has been requested.
134 If set to a comma separated list of valid HTTP methods, the pre-flight will return
139 Access-Control-Allow-Origin header field, used for cross-origin resource
141 See the [Wikipedia page on CORS](http://en.wikipedia.org/wiki/Cross-origin_resource_sharing).
147 subnet is pre-pended by either a `-` or a `+` sign. A plus sign means allow,
148 where a minus sign means deny. If a subnet mask is omitted, such as `-1.2.3.4`,
155 -0.0.0.0/0,+192.168/16 deny all accesses, only allow 192.168/16 subnet
169 `-additional_header "X-Frame-Options: SAMEORIGIN"`
219 addition to standard ones. The list must be comma-separated list
230 `#!/path/to/php-cgi.exe` and `#!/path/to/perl.exe` must be first lines of the
233 server. If CivetWeb is started by mouse double-click on Windows, the current
237 more efficient to set `cgi_interpreter` to the path to `php-cgi.exe`.
239 Note that PHP scripts must use `php-cgi.exe` as executable, not `php.exe`.
244 use `/path/to/cgi-bin/**.cgi` as the pattern. Note that the full file path is
277 correct Content-Length HTTP header for each request. If this is forgotten the
308 404 - page requested by the client not found), a group of http status codes
309 (e.g., 4xx - all client errors) or all errors. The corresponding error pages
315 Extra mime types, in the form `extension1=type1,exten-sion2=type2,...`.
322 working directory. If set, per-directory `.htpasswd` files are ignored,
331 Password files may be generated using `CivetWeb -A` as explained above, or
332 online tools e.g. [this generator](http://www.askapache.com/online-tools/htpasswd-generator).
339 CivetWeb -hide_files_patterns secret.txt|**.hide
346 Comma-separated list of files to be treated as directory index files.
350 In case built-in Lua support has been enabled, `index.lp,index.lsp,index.lua`
354 Idle timeout between two requests in one keep-alive connection.
359 Unfortunately, browsers do not close the keep-alive connection after loading
361 The server closes a keep-alive connection, if there is no additional request
369 automatically use keep-alive if keep\_alive\_timeout\_ms is not 0.
375 Setting the value to -1 will turn off linger.
376 If the value is not set (or set to -2), CivetWeb will not set the linger
417 ### lua\_server\_page\_pattern `**.lp$|**.lsp$`
428 Comma-separated list of ports to listen on. If the port is SSL, a
430 port 80 and port 443, and connections on port 443 will be SSL-ed.
431 For non-SSL ports, it is allowed to append letter `r`, meaning 'redirect'.
437 an IP address and a colon must be pre-pended to the port number.
465 local host, you could use `ip6-localhost:80`. This translates to
471 environment - in some cases, you might need to resort to a fixed IP address.
506 If a client intends to keep long-running connection, either increase this
507 value or (better) use keep-alive messages.
516 civetweb -listening_ports 80 -run_as_user webserver
521 SSI is a simple interpreted server-side scripting language which is most
526 In order for a webpage to recognize an SSI-enabled HTML file, the filename
532 directives are supported, `<!--#include ...>` and
533 `<!--#exec "command">`. Note that the `<!--#include ...>` directive supports
536 <!--#include virtual="path"> Path is relative to web server root
537 <!--#include abspath="path"> Path is absolute or relative to
539 <!--#include file="path">, Path is relative to current document
540 <!--#include "path">
547 <!--#exec "ls -l" -->
591 ------------ | -------------
623 This option will set the `Cache-Control: max-age` value for static files.
634 Set the `Strict-Transport-Security` header, and set the `max-age` value.
641 or set to -1, no `Strict-Transport-Security` header will be sent.
642 For values <-1 and values >31622400, the behaviour is undefined.
655 Limit download speed for clients. `throttle` is a comma-separated
662 The value is a floating-point number of bytes per second, optionally
675 Comma-separated list of URL rewrites in the form of
688 CivetWeb -url_rewrite_patterns **.doc$=/path/to/cgi-bin/handle_doc.cgi
692 CivetWeb -url_rewrite_patterns /~joe/=/home/joe/,/~bill=/home/bill/
714 the stand-alone executable. These options are not supported by other applications
739 ----
742 Pre-built Windows and Mac CivetWeb binaries have built-in Lua scripting
750 Lua Server Pages (default extensions: *.lsp, *.lp) are html pages containing
784 CivetWeb can be built with Lua 5.1, 5.2, 5.3, 5.4 (currently pre-release)
800 [page2.lp](https://github.com/civetweb/civetweb/blob/master/test/page2.lp)
803 [page4kepler.lp](https://github.com/civetweb/civetweb/blob/master/test/page4kepler.lp)
816 [page.lp](https://github.com/civetweb/civetweb/blob/master/test/page.lp).
823 mg.read() -- reads a chunk from POST data, returns it as a string
824 mg.write(str) -- writes string to the client
825 mg.include(filename, [pathtype]) -- include another Lua Page file (Lua Pages only)
826 -- pathtype can be "abs", "rel"/"file" or "virt[ual]"
827 -- like defined for SSI #include
828 mg.redirect(uri) -- internal redirect to a given URI
829 mg.onerror(msg) -- error handler, can be overridden
830 mg.version -- a string that holds CivetWeb version
831 mg.document_root -- a string that holds the document root directory
832 mg.auth_domain -- a string that holds the HTTP authentication domain
833 mg.get_var(str, varname) -- extract variable from (query) string
834 mg.get_cookie(str, cookie) -- extract cookie from a string
835 mg.get_mime_type(filename) -- get MIME type of a file
836 mg.get_info(infotype) -- get server status information
837 mg.send_file(filename) -- send a file, including all required HTTP headers
838 mg.send_file_body(filename) -- send a file, excluding HTTP headers
839 mg.url_encode(str) -- URL encode a string
840 mg.url_decode(str, [form]) -- URL decode a string. If form=true, replace + by space.
841 mg.base64_encode(str) -- BASE64 encode a string
842 mg.base64_decode(str) -- BASE64 decode a string
843 mg.md5(str) -- return the MD5 hash of a string
844 mg.keep_alive(bool) -- allow/forbid to use http keep-alive for this request
845 mg.request_info -- a table with the following request information
846 .remote_addr -- IP address of the client as string
847 .remote_port -- remote port number
848 .server_port -- server port number
849 .request_method -- HTTP method (e.g.: GET, POST)
850 .http_version -- HTTP protocol version (e.g.: 1.1)
851 .uri -- resource name
852 .query_string -- query string if present, nil otherwise
853 .script_name -- name of the Lua script
854 .https -- true if accessed by https://, false otherwise
855 .remote_user -- user name if authenticated, nil otherwise
859 -- Connect to the remote TCP server. This function is an implementation
860 -- of simple socket interface. It returns a socket object with three
861 -- methods: send, recv, close, which are synchronous (blocking).
862 -- connect() throws an exception on connection error.
863 -- use_ssl is not implemented.
866 -- Example of using connect() interface:
867 local host = 'www.example.com' -- IP address or domain name
874 -- reply now contains the web page http://www.example.com/
891 mg.write('HTTP/1.0 200 OK\r\nContent-Type: text/html\r\n\r\n')
896 Content-Type: text/html
903 <? mg.write('HTTP/1.0 200 OK\r\nContent-Type: text/html\r\n\r\n') ?>
908 In this case, CivetWeb automatically creates a "200 OK"/"Content-Type: text/html"
914 HTML pages, while traditional CivetWeb syntax can be used to send a content-type
923 open(arg) -- callback to accept or reject a connection
924 ready(arg) -- called after a connection has been established
925 data(arg) -- called when the server receives data from the client
926 close(arg) -- called when a websocket connection is closed
975 ----
978 - PHP doesn't work - getting empty page, or 'File not found' error. The
980 the correct interpreter is `php-cgi.exe` (`php-cgi` on UNIX).
982 `CivetWeb -cgi_interpreter /full/path/to/php-cgi`
984 - `php-cgi` is unavailable, for example on Mac OS X. As long as the `php` binary is installed, you …
988 echo "Content-Type: text/html\r\n\r\n";
992 - CivetWeb fails to start. If CivetWeb exits immediately when started, this
994 (named `civetweb.conf` by default) or the command-line arguments.
1000 - Embedding with OpenSSL on Windows might fail because of calling convention.