Main  /  Edit  /  History  /   /  Users Area

Tutorial: "Hello World!" Configuration

Configuration File

Every CppCMS based application should come with a configuration file. You can find a configuration file template with full comments in docs folder at your CppCMS installation.

We will write a simple file that consists of few lines:

server.api = "fastcgi"
server.mod = "prefork"
server.socket = "/tmp/fcgi-hello.socket"

This will define a basic settings for the runtime mode:

  1. API that uses CppCMS in communication with web server, in our case "fastcgi". Other options are "scgi" and "cgi".
  2. Worker mode of CppCMS -- prefork -- application forks several processes that process queries. Other possible options are single process and thread mode -- "process" and single process multiple threads mode "thread".
  3. The socket that would use the web server to connect with your fastcgi application

We would save it as "config.txt" and run cppcms_run utility

cppcms_run hello.fcgi -c config.txt

If you have lighttpd, nginx or apache2 with mod_fastcgi installed, they would be configured and started with your application.


Now restart your web server, open a web browser and go to http://localhost:8080/hello.fcgi. You should see the traditional "Hello World"


CppCMS is a web development framework for performance demanding applications.

Support This Project Logo

Поддержать проект

CppCMS needs You


Main Page

Valid CSS | Valid XHTML 1.0