summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/modules/http
diff options
context:
space:
mode:
Diffstat (limited to 'sca-cpp/trunk/modules/http')
-rw-r--r--sca-cpp/trunk/modules/http/Makefile.am10
-rw-r--r--sca-cpp/trunk/modules/http/curl.hpp1
-rwxr-xr-xsca-cpp/trunk/modules/http/httpd-conf26
-rwxr-xr-xsca-cpp/trunk/modules/http/httpd-restart4
-rwxr-xr-xsca-cpp/trunk/modules/http/httpd-start4
-rwxr-xr-xsca-cpp/trunk/modules/http/httpd-stop4
6 files changed, 42 insertions, 7 deletions
diff --git a/sca-cpp/trunk/modules/http/Makefile.am b/sca-cpp/trunk/modules/http/Makefile.am
index 224fcc1557..795137b6ca 100644
--- a/sca-cpp/trunk/modules/http/Makefile.am
+++ b/sca-cpp/trunk/modules/http/Makefile.am
@@ -17,6 +17,9 @@
INCLUDES = -I${HTTPD_INCLUDE}
+incl_HEADERS = *.hpp
+incldir = $(prefix)/include/modules/http
+
dist_mod_SCRIPTS = httpd-conf httpd-start httpd-stop httpd-restart httpd-ca-conf httpd-cert-conf httpd-ssl-conf
moddir=$(prefix)/modules/http
@@ -26,16 +29,21 @@ curl_test_LDFLAGS = -lxml2 -lcurl -lmozjs
curl_get_SOURCES = curl-get.cpp
curl_get_LDFLAGS = -lxml2 -lcurl -lmozjs
-mod_DATA = httpd.prefix curl.prefix
+mod_DATA = httpd.prefix httpd-apachectl.prefix httpd-modules.prefix curl.prefix
nobase_dist_mod_DATA = conf/*
EXTRA_DIST = htdocs/index.html
httpd.prefix: $(top_builddir)/config.status
echo ${HTTPD_PREFIX} >httpd.prefix
+httpd-apachectl.prefix: $(top_builddir)/config.status
+ echo ${HTTPD_APACHECTL_PREFIX} >httpd-apachectl.prefix
+httpd-modules.prefix: $(top_builddir)/config.status
+ echo ${HTTPD_MODULES_PREFIX} >httpd-modules.prefix
curl.prefix: $(top_builddir)/config.status
echo ${CURL_PREFIX} >curl.prefix
dist_noinst_SCRIPTS = httpd-test http-test
noinst_PROGRAMS = curl-test curl-get
TESTS = httpd-test http-test
+
diff --git a/sca-cpp/trunk/modules/http/curl.hpp b/sca-cpp/trunk/modules/http/curl.hpp
index 3d11ac56b1..61f40eb475 100644
--- a/sca-cpp/trunk/modules/http/curl.hpp
+++ b/sca-cpp/trunk/modules/http/curl.hpp
@@ -26,6 +26,7 @@
* CURL HTTP client functions.
*/
+#include <unistd.h>
#include <curl/curl.h>
#include <curl/types.h>
#include <curl/easy.h>
diff --git a/sca-cpp/trunk/modules/http/httpd-conf b/sca-cpp/trunk/modules/http/httpd-conf
index fa3ce09fc9..f720f40abd 100755
--- a/sca-cpp/trunk/modules/http/httpd-conf
+++ b/sca-cpp/trunk/modules/http/httpd-conf
@@ -25,6 +25,7 @@ port=$3
htdocs=`readlink -f $4`
user=`id -un`
group=`id -gn`
+modules_prefix=`cat $here/httpd-modules.prefix`
mkdir -p $root
mkdir -p $root/logs
@@ -34,6 +35,31 @@ cat >$root/conf/httpd.conf <<EOF
# Set server name
ServerName $host
+PidFile $root/logs/httpd.pid
+
+# Minimal set of modules
+LoadModule authn_file_module ${modules_prefix}/modules/mod_authn_file.so
+LoadModule authn_default_module ${modules_prefix}/modules/mod_authn_default.so
+LoadModule authz_host_module ${modules_prefix}/modules/mod_authz_host.so
+LoadModule authz_groupfile_module ${modules_prefix}/modules/mod_authz_groupfile.so
+LoadModule authz_user_module ${modules_prefix}/modules/mod_authz_user.so
+LoadModule authz_default_module ${modules_prefix}/modules/mod_authz_default.so
+LoadModule auth_basic_module ${modules_prefix}/modules/mod_auth_basic.so
+LoadModule filter_module ${modules_prefix}/modules/mod_filter.so
+LoadModule proxy_module ${modules_prefix}/modules/mod_proxy.so
+LoadModule proxy_connect_module ${modules_prefix}/modules/mod_proxy_connect.so
+LoadModule proxy_http_module ${modules_prefix}/modules/mod_proxy_http.so
+LoadModule proxy_balancer_module ${modules_prefix}/modules/mod_proxy_balancer.so
+LoadModule ssl_module ${modules_prefix}/modules/mod_ssl.so
+LoadModule mime_module ${modules_prefix}/modules/mod_mime.so
+LoadModule status_module ${modules_prefix}/modules/mod_status.so
+LoadModule asis_module ${modules_prefix}/modules/mod_asis.so
+LoadModule negotiation_module ${modules_prefix}/modules/mod_negotiation.so
+LoadModule dir_module ${modules_prefix}/modules/mod_dir.so
+LoadModule rewrite_module ${modules_prefix}/modules/mod_rewrite.so
+<IfModule !log_config_module>
+LoadModule log_config_module ${modules_prefix}/modules/mod_log_config.so
+</IfModule>
# Basic security precautions
User $user
diff --git a/sca-cpp/trunk/modules/http/httpd-restart b/sca-cpp/trunk/modules/http/httpd-restart
index 92f27eb0df..3e3b687f98 100755
--- a/sca-cpp/trunk/modules/http/httpd-restart
+++ b/sca-cpp/trunk/modules/http/httpd-restart
@@ -21,5 +21,5 @@
here=`readlink -f $0`; here=`dirname $here`
root=`readlink -f $1`
-httpd_prefix=`cat $here/httpd.prefix`
-$httpd_prefix/bin/apachectl -k graceful -d $root
+apachectl=`cat $here/httpd-apachectl.prefix`
+$apachectl -k graceful -d $root -f $root/conf/httpd.conf
diff --git a/sca-cpp/trunk/modules/http/httpd-start b/sca-cpp/trunk/modules/http/httpd-start
index 91fc5284af..5c006d1b54 100755
--- a/sca-cpp/trunk/modules/http/httpd-start
+++ b/sca-cpp/trunk/modules/http/httpd-start
@@ -21,5 +21,5 @@
here=`readlink -f $0`; here=`dirname $here`
root=`readlink -f $1`
-httpd_prefix=`cat $here/httpd.prefix`
-$httpd_prefix/bin/apachectl -E $root/logs/error_log -k start -d $root
+apachectl=`cat $here/httpd-apachectl.prefix`
+$apachectl -E $root/logs/error_log -k start -d $root -f $root/conf/httpd.conf
diff --git a/sca-cpp/trunk/modules/http/httpd-stop b/sca-cpp/trunk/modules/http/httpd-stop
index 7f4fe94629..09ac5d035f 100755
--- a/sca-cpp/trunk/modules/http/httpd-stop
+++ b/sca-cpp/trunk/modules/http/httpd-stop
@@ -21,5 +21,5 @@
here=`readlink -f $0`; here=`dirname $here`
root=`readlink -f $1`
-httpd_prefix=`cat $here/httpd.prefix`
-$httpd_prefix/bin/apachectl -k graceful-stop -d $root
+apachectl=`cat $here/httpd-apachectl.prefix`
+$apachectl -k graceful-stop -d $root -f $root/conf/httpd.conf