CppCMS provides a simple utility that allows you run and |
debug cppcms based applications. |
|
## Requirements: |
|
You need to install one of the following web servers: |
|
1. [Lighttpd](http://lighttpd.net) |
2. [Nginx](http://www.nginx.net/) |
3. [Apache2](http://httpd.apache.org/) with [mod_fastcgi](http://www.fastcgi.com/mod_fastcgi/docs/mod_fastcgi.html) |
|
You need to define a **unix domain** socket in your configuration file, for example: `server.socket="/tmp/app.sock"` |
|
If you use nginx or apache, you should define `server.api="fastcgi"`. If you use have lighttpd, you may choose "scgi" as well. |
|
## Usage |
|
Usage cppcms_run [-e] [ -S server ] [-p port] [-h host] \ |
[-r /document/root ] [-s /script ] |
program -c config.txt [ additional parameters ] |
-c configuration file of cppcms executable |
-p port to start the server on, default 8080 |
-s fastcgi script name, default '/'+your program name |
-h host to bind, default 127.0.0.1 |
-r document root (default .) |
-S (lighttpd|nginx|apache2) - web server you want to run |
-e Do not start application, started externaly (for debugging) |
|
For example: |
|
cppcms_run hello -c config.txt |
|
Would start a server at 127.0.0.1:8080 and the application will be accessable from "/hello" path at server. |
|
If you do not specify webserver, cppcms_run first will try to locate ligttpd, then nginx -- asynchronous lightweight servers and then it would try to locate apache2 to run it. |
removed |