Script shoud will be launched as a specific user, and currently I do not want to configure suexecduring testing apache.
Nothing prevents you from duplicating the required Apache configuration, except for the user under whom it will be launched httpd, the interface / port for binding to and, possibly, the directory cgi-binand launching a separate copy httpd(with the option -f). This would be the safest way to test the application in the environment you intend to run.
See Starting Apache :
you can specify its location at run time using the command line option -f, as in
/usr/local/apache2/bin/apachectl -f /usr/local/apache2/conf/httpd.conf
source
share