diff options
Diffstat (limited to 'sca-cpp/trunk/modules/http/httpd-conf')
-rwxr-xr-x | sca-cpp/trunk/modules/http/httpd-conf | 37 |
1 files changed, 27 insertions, 10 deletions
diff --git a/sca-cpp/trunk/modules/http/httpd-conf b/sca-cpp/trunk/modules/http/httpd-conf index 54154e119e..730775fa89 100755 --- a/sca-cpp/trunk/modules/http/httpd-conf +++ b/sca-cpp/trunk/modules/http/httpd-conf @@ -22,8 +22,6 @@ here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $h mkdir -p $1 root=`echo "import os; print os.path.realpath('$1')" | python` -jsprefix=`echo "import os; print os.path.realpath('$here/../js')" | python` - host=$2 port=`$here/httpd-addr port $3` pport=`$here/httpd-addr pport $3` @@ -44,8 +42,10 @@ group=`id -gn` uname=`uname -s` if [ $uname = "Darwin" ]; then libsuffix=".dylib" + sendfile=Off else libsuffix=".so" + sendfile=On fi modules_prefix=`cat $here/httpd-modules.prefix` @@ -76,6 +76,8 @@ Timeout 45 RequestReadTimeout header=20-40,MinRate=500 body=20,MinRate=500 LimitRequestBody 1048576 HostNameLookups Off +#MaxKeepAliveRequests 25 +#MaxConnectionsPerChild 100 # Log HTTP requests # [timestamp] [access] remote-host remote-ident remote-user "request-line" @@ -92,9 +94,13 @@ AddCharset utf-8 .html .js .css # Configure cache control <Directory /> ExpiresActive On -ExpiresDefault M604800 +ExpiresDefault A604800 +Header onsuccess merge Cache-Control public env=!private-cache </Directory> +# Enable Linux Kernel sendfile +EnableSendFile $sendfile + # Configure auth modules Include conf/auth.conf @@ -133,7 +139,7 @@ ServerName http://$host$pportsuffix <Location /> RewriteEngine on -RewriteCond %{HTTP_HOST} !^$host [NC] +Include conf/hostcond.conf RewriteCond %{HTTP:X-Forwarded-Server} ^$ [NC] RewriteCond %{REQUEST_URI} !^/server-status [NC] RewriteCond %{REQUEST_URI} !^/balancer-manager [NC] @@ -166,11 +172,16 @@ cat >$root/conf/mpm.conf <<EOF # Generated by: httpd-conf $* LoadModule mpm_prefork_module ${modules_prefix}/modules/mod_mpm_prefork.so +EOF + +if [ $uname = "Darwin" ]; then + cat >>$root/conf/mpm.conf <<EOF # Generated by: httpd-conf $* # Set thread stack size ThreadStackSize 2097152 EOF +fi # Generate modules list cat >$root/conf/modules.conf <<EOF @@ -181,6 +192,7 @@ cat >$root/conf/modules.conf <<EOF LoadModule headers_module ${modules_prefix}/modules/mod_headers.so LoadModule alias_module ${modules_prefix}/modules/mod_alias.so LoadModule authn_file_module ${modules_prefix}/modules/mod_authn_file.so +LoadModule authn_socache_module ${modules_prefix}/modules/mod_authn_socache.so LoadModule authn_core_module ${modules_prefix}/modules/mod_authn_core.so LoadModule authz_host_module ${modules_prefix}/modules/mod_authz_host.so LoadModule authz_groupfile_module ${modules_prefix}/modules/mod_authz_groupfile.so @@ -197,8 +209,9 @@ 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 lbmethod_byrequests_module ${modules_prefix}/modules/mod_lbmethod_byrequests.so -LoadModule ssl_module ${modules_prefix}/modules/mod_ssl.so LoadModule socache_shmcb_module ${modules_prefix}/modules/mod_socache_shmcb.so +LoadModule cache_module ${modules_prefix}/modules/mod_cache.so +LoadModule cache_disk_module ${modules_prefix}/modules/mod_cache_disk.so LoadModule rewrite_module ${modules_prefix}/modules/mod_rewrite.so LoadModule mime_module ${modules_prefix}/modules/mod_mime.so LoadModule status_module ${modules_prefix}/modules/mod_status.so @@ -218,12 +231,10 @@ LoadModule actions_module ${modules_prefix}/modules/mod_actions.so LoadModule unixd_module ${modules_prefix}/modules/mod_unixd.so LoadModule session_module ${modules_prefix}/modules/mod_session.so LoadModule session_crypto_module ${modules_prefix}/modules/mod_session_crypto.so -LoadModule session_cookie_module ${modules_prefix}/modules/mod_session_cookie.so LoadModule slotmem_shm_module ${modules_prefix}/modules/mod_slotmem_shm.so LoadModule ratelimit_module ${modules_prefix}/modules/mod_ratelimit.so LoadModule reqtimeout_module ${modules_prefix}/modules/mod_reqtimeout.so - -LoadModule mod_tuscany_ssltunnel $here/libmod_tuscany_ssltunnel$libsuffix +LoadModule ssl_module ${modules_prefix}/modules/mod_ssl.so EOF @@ -303,7 +314,6 @@ cat >$root/conf/httpd.groups <<EOF # Generated by: httpd-conf $* EOF - # Allow public access to server resources cat >$root/conf/noauth.conf <<EOF # Generated by: httpd-conf $* @@ -331,7 +341,7 @@ UseCanonicalName Off # Enable HTTP reverse proxy ProxyRequests Off -ProxyPreserveHost Off +ProxyPreserveHost On ProxyStatus On # Enable server status @@ -356,3 +366,10 @@ Include conf/vhost.conf EOF +# Generate host name check condition +cat >$root/conf/hostcond.conf <<EOF +# Generated by: httpd-conf $* +RewriteCond %{HTTP_HOST} !^$host [NC] + +EOF + |