X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plc.d%2Fhttpd;h=3d21644a06c13443dc26650efc52c82cc58f4bf1;hb=b6028e4d49a8e766290096575c80298c2ae2eab5;hp=67012236081bb97ec963e57696cb267adf202163;hpb=056625369a7163e8540b1e5cee4d756c07a64456;p=myplc.git diff --git a/plc.d/httpd b/plc.d/httpd index 6701223..3d21644 100755 --- a/plc.d/httpd +++ b/plc.d/httpd @@ -1,6 +1,4 @@ #!/bin/bash -# $Id$ -# $URL$ # # priority: 600 # @@ -58,6 +56,10 @@ case "$1" in include_path=".:$DocumentRoot/planetlab/includes:$DocumentRoot/plekit/php:$DocumentRoot/generated:/etc/planetlab/php:/usr/share/plc_api/php" sed -i -e "s@[;]*include_path = \"\.:.*\"@include_path = \"$include_path\"@" $php_ini + # Set open_basedir so as to avoid leaks + open_basedir="$DocumentRoot:/etc/planetlab/php:/usr/share/plc_api/php:/var/log/myslice:/var/tmp/bootmedium:/tmp" + sed -i -e "s@[;]*open_basedir =.*@open_basedir = \"$open_basedir\"@" $php_ini + # for php-5.3 under fedora12, otherwise issues tons of warning messages # Set timezone in php.ini if not already there if grep '^;date.timezone' $php_ini >& /dev/null; then @@ -65,6 +67,10 @@ case "$1" in sed -i -e 's,^;date.timezone.*,date.timezone = GMT,' $php_ini fi + if grep '^short_open_tag = Off' $php_ini >& /dev/null; then + sed -i -e 's,^short_open_tag = Off,short_open_tag = On,' $php_ini + fi + # Disable default Listen directive sed -i -e '/^Listen/d' $httpd_conf