Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Server Configuration

Apache configuration file

This library should work with all available HTTP servers for CGI operation.

For FastCGI, currently the only regularly tested server is Apache 2.2 with mod_fcgid. mod_fastcgi has also been tested quite thoroughly, but there are reportedly chronic issues with mod_fastcgi so mod_fcgid is always preferred. Hopefully mod_fcgid will include an external FastCGI server setup in the future.

I would like to provide a more comprehensive list of supported servers and platforms. Any server that follows the FastCGI specification on a POSIX system should work with this library [8] .

An example Apache configuration file which should be sufficient for CGI and FastCGI operation on both Windows and Linux is provided below. The configuration below is for demonstration purposes: combined with an entry into your system's hosts file that maps http://boost.cgi to 127.0.0.1, you will have a site available via http:/boost.cgi in your browser to access your compiled CGI or FastCGI applications.

LoadModule fcgid_module modules/mod_fcgid.so

##################################################
# http://boost.cgi/
#
Listen 127.0.0.1:80
#
<VirtualHost 127.0.0.1:80>
    ServerName boost.cgi

    ErrorLog "/path/to/error.log"
    DocumentRoot "/path/to/htdocs/"
    ScriptAlias /cgi/ "/path/to/cgi-bin/"
    <Location /cgi/>
        Options +ExecCGI
        SetHandler cgi-script
        Order deny,allow
        Allow from localhost
    </Directory>
    Alias /fcgi/ "/path/to/fcgi-bin/"
    <Location /fcgi/>
        SetHandler fcgid-script
        Options +ExecCGI
        Order deny,allow
        Allow from localhost
    </Location>
</VirtualHost>



[8] Not sure about Mac OS X without access to that operating system


PrevUpHomeNext