File:  [ELWIX - Embedded LightWeight unIX -] / suX / README
Revision 1.2.2.1: download - view: text, annotated - select for diffs - revision graph
Fri Jun 19 00:07:09 2015 UTC (8 years, 11 months ago) by misho
Branches: sux3_4
Diff to: branchpoint 1.2: preferred, colored
adds clarification

============================================
 (C)`11 AITNET - Sofia/Bulgaria
    by Michael Pounov <misho@elwix.org>

 $Id: README,v 1.2.2.1 2015/06/19 00:07:09 misho Exp $
============================================

suX program is flexible CGI/FastCGI wrappper

How to build, install and use with apache server 
------------------------------------------------

0) Build and install suX on the operating system. See INSTALL file!
1) Install in system mod_fcgid FastCGI apache module
2) Modify httpd.conf like that
	.....

	LoadModule fcgid_module /usr/local/lib/apache2/mod_fcgid.so

	.....
3) Do this into apache config
	.....

	AddType application/x-httpd-php .php .phtml .php3 .php4 .php5 .inc
	AddType application/x-httpd-php-source .phps

	<IfModule mod_fcgid.c>
		AddHandler fcgid-script .fcgi .php .php3 .php4 .php5 .inc .phps .pl
		FCGIWrapper /exports/hosting/www/cgi-bin/php-fcgi .php
		FCGIWrapper /exports/hosting/www/cgi-bin/php-fcgi .phps
		FCGIWrapper /exports/hosting/www/cgi-bin/php-fcgi .php3
		FCGIWrapper /exports/hosting/www/cgi-bin/php-fcgi .php4
		FCGIWrapper /exports/hosting/www/cgi-bin/php-fcgi .php5
		FCGIWrapper /exports/hosting/www/cgi-bin/php-fcgi .inc
	</IfModule>

	.....

	<Directory />
		.....
		# This just declare if you wish to pass declared handlers to FastCGI
		Options +ExecCGI
		.....
	</Directory>
4) Copy cgi/php-fcgi wrapper script from project to apache cgi-bin directory. 
If you want to change effective user. Just changes in value of SUX_USER into php-fcgi script ;)

5) Copy etc/suX.conf in /etc and change associated file types to right program paths

Ok! After few steps we are ready to use web in more safe environment :D

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>