diff options
Diffstat (limited to 'sca-cpp/trunk/modules/http')
-rwxr-xr-x | sca-cpp/trunk/modules/http/http-test | 2 | ||||
-rwxr-xr-x | sca-cpp/trunk/modules/http/httpd-ca-conf | 5 | ||||
-rwxr-xr-x | sca-cpp/trunk/modules/http/httpd-cert-conf | 3 | ||||
-rwxr-xr-x | sca-cpp/trunk/modules/http/httpd-conf | 6 | ||||
-rwxr-xr-x | sca-cpp/trunk/modules/http/httpd-ssl-conf | 19 | ||||
-rwxr-xr-x | sca-cpp/trunk/modules/http/httpd-test | 2 |
6 files changed, 15 insertions, 22 deletions
diff --git a/sca-cpp/trunk/modules/http/http-test b/sca-cpp/trunk/modules/http/http-test index 9f65b37eec..0db47fe189 100755 --- a/sca-cpp/trunk/modules/http/http-test +++ b/sca-cpp/trunk/modules/http/http-test @@ -18,7 +18,7 @@ # under the License. # Setup -./httpd-conf tmp 8090 htdocs +./httpd-conf tmp localhost 8090 htdocs ./httpd-start tmp sleep 2 diff --git a/sca-cpp/trunk/modules/http/httpd-ca-conf b/sca-cpp/trunk/modules/http/httpd-ca-conf index 20efb441b5..f59ff71d46 100755 --- a/sca-cpp/trunk/modules/http/httpd-ca-conf +++ b/sca-cpp/trunk/modules/http/httpd-ca-conf @@ -21,11 +21,8 @@ here=`readlink -f $0`; here=`dirname $here` root=`readlink -f $1` host=$2 -if [ "$host" = "" ]; then - host=`hostname -f` -fi -# Don't regenerate the certificate if it already exists +# Don't override existing certificate if [ -f $root/conf/ca.crt ]; then return 0 fi diff --git a/sca-cpp/trunk/modules/http/httpd-cert-conf b/sca-cpp/trunk/modules/http/httpd-cert-conf index be357554fb..7bf22d4668 100755 --- a/sca-cpp/trunk/modules/http/httpd-cert-conf +++ b/sca-cpp/trunk/modules/http/httpd-cert-conf @@ -21,9 +21,6 @@ here=`readlink -f $0`; here=`dirname $here` root=`readlink -f $1` host=$2 -if [ "$host" = "" ]; then - host=`hostname -f` -fi # Don't regenerate the certificate if it already exists if [ -f $root/conf/server.crt ]; then diff --git a/sca-cpp/trunk/modules/http/httpd-conf b/sca-cpp/trunk/modules/http/httpd-conf index 3ed27c6680..fa3ce09fc9 100755 --- a/sca-cpp/trunk/modules/http/httpd-conf +++ b/sca-cpp/trunk/modules/http/httpd-conf @@ -20,9 +20,9 @@ # Generate a minimal HTTPD configuration here=`readlink -f $0`; here=`dirname $here` root=`readlink -f $1` -port=$2 -htdocs=`readlink -f $3` -host=`hostname -f` +host=$2 +port=$3 +htdocs=`readlink -f $4` user=`id -un` group=`id -gn` diff --git a/sca-cpp/trunk/modules/http/httpd-ssl-conf b/sca-cpp/trunk/modules/http/httpd-ssl-conf index 6660ad9792..b064dc02dc 100755 --- a/sca-cpp/trunk/modules/http/httpd-ssl-conf +++ b/sca-cpp/trunk/modules/http/httpd-ssl-conf @@ -20,13 +20,9 @@ # Generate a minimal HTTPD SSL configuration here=`readlink -f $0`; here=`dirname $here` root=`readlink -f $1` -port=$2 -if [ "$port" != "80" ]; then - sslport=`echo "$port + 443" | bc` -else - sslport="443" -fi -host=`hostname -f` +host=$2 +sslport=$3 +htdocs=`readlink -f $4` # Extract organization name from our CA certificate org=`openssl x509 -noout -subject -nameopt multiline -in $root/conf/ca.crt | grep organizationName | awk -F "= " '{ print $2 }'` @@ -61,7 +57,12 @@ SSLCACertificateFile "$root/conf/ca.crt" SSLCertificateFile "$root/conf/server.crt" SSLCertificateKeyFile "$root/conf/server.key" BrowserMatch ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0 + +# Logging CustomLog "$root/logs/ssl_request_log" "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" +LogFormat "%h %l %u %t %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" sslcombined +CustomLog $root/logs/ssl_access_log sslcombined +LogLevel warn # Require clients to present either: # a certificate signed with our CA certificate of authority @@ -91,9 +92,7 @@ SCASSLCertificateKeyFile "$root/conf/server.key" EOF # Create test users for HTTP basic authentication -htpasswd -bc $root/conf/httpd.passwd admin admin 2>/dev/null -htpasswd -b $root/conf/httpd.passwd user password 2>/dev/null -htpasswd -b $root/conf/httpd.passwd test test 2>/dev/null +htpasswd -bc $root/conf/httpd.passwd test test 2>/dev/null htpasswd -b $root/conf/httpd.passwd foo foo 2>/dev/null htpasswd -b $root/conf/httpd.passwd bar bar 2>/dev/null diff --git a/sca-cpp/trunk/modules/http/httpd-test b/sca-cpp/trunk/modules/http/httpd-test index 952a58937a..ca6b3e19a1 100755 --- a/sca-cpp/trunk/modules/http/httpd-test +++ b/sca-cpp/trunk/modules/http/httpd-test @@ -20,7 +20,7 @@ echo "Testing..." # Setup -./httpd-conf tmp 8090 htdocs +./httpd-conf tmp localhost 8090 htdocs ./httpd-start tmp sleep 2 |