--- smeserver-sitemaker-2.0.1/root/usr/local/bin/smesm.FixCGIandHttpdSettingsPlusWarn 2007-12-06 12:41:18.000000000 -0200 +++ smeserver-sitemaker-2.0.1/root/usr/local/bin/smesm 2008-06-29 03:28:50.000000000 -0300 @@ -4,13 +4,24 @@ # nhall@unixlan.com.ar # # Status -# Version: 2.0 +# Version: 2.2 # 20/10/2007 (d/m/Y) # # # Changelog # -# 2.0 (reloaded) (by Normando Hall) +# 2.2 (by Normando Hall) +# Fix f_fop f_rgl flags and their settings +# Fix SSLRequireSSL directive +# Change for cgi. If you specify a directory +# then create under root dir, and set with ScripAlias +# directive. If not, we assume you can use the root dir +# to execute cgi scripts, so we avoid the use of ScriptAlias +# and use the Options +ExecCGI directive plus +# AddHandler cgi-script .cgi .pl +# Added a warning about white spaces in names and diretories. +# +# 2.1 (reloaded) (by Normando Hall) # Remove SME6 compatibility # Fix root dir perms # Improve instructions and visual @@ -68,6 +79,8 @@ echo "| With SMESiteMaker, you only have to answer the questions in |" echo "| the wizard. |" echo "| |" +echo "| WARNING: Never use white spaces in names or directories! |" +echo "| |" echo "| If you feel confortable with the above then press enter, if |" echo "| not press Ctrl+C to abort the configuration script. |" echo "| |" @@ -357,7 +370,7 @@ if [ "$cgi_root" != "" ] then c_root=$f_root/$cgi_root - +f_cgisamedir="0" if [ -d $c_root ] then @@ -392,10 +405,12 @@ c_root=$f_root chown root.www $c_root chmod 755 $c_root - +f_cgisamedir="1" fi ###################### - CGI ALIAS -######################################### +if [ "$f_cgisamedir" == "0" ] +then ANSWER=1 while [ $ANSWER = 1 ] do @@ -422,6 +437,7 @@ done fi +fi ################################ - MySQL - #######################################3 query_file="/tmp/SMESM_query" clear @@ -665,21 +681,14 @@ fi fopt="" touch $c_file -if [ "$f_cgi" == "1" ] +if [ "$f_cgi" == "1" ]&&[ "$f_cgisamedir" == "0" ] then echo "ScriptAlias $a_root$ca_root $c_root" > $c_file fi echo "Alias $a_root $f_root" >> $c_file echo "" >> $c_file -if [ "$f_ssl" == "1" ] -then -echo 'SSLRequireSSL on' >> $c_file -fi -if [ "$f_php" == "1" ] -then -echo 'AddType application/x-httpd-php .php .php3 .phtml' >> $c_file -fi -if [ "$f_idx" == "1" ]||[ "$f_aov" == "1" ] + +if [ "$f_idx" == "1" ]||[ "$f_aov" == "1" ]||[ "$f_cgisamedir" == "1" ] then fopt="Options " if [ "$f_idx" == "1" ] @@ -690,12 +699,35 @@ then fopt="$fopt FollowSymLinks " fi +if [ "$f_cgi" == "1" ]&&[ "$f_cgisamedir" == "1" ] +then +fopt="$fopt +ExecCGI " +fi echo "$fopt" >> $c_file -if [ "$f_aov" == "1" ] +fi + +if [ "$f_ssl" == "1" ] then -echo 'AllowOverride all' >> $c_file +echo 'SSLRequireSSL' >> $c_file fi + +if [ "$f_php" == "1" ] +then +echo 'AddType application/x-httpd-php .php .php3 .phtml' >> $c_file fi + +if [ "$f_cgi" == "1" ]&&[ "$f_cgisamedir" == "1" ] +then +echo 'AddHandler cgi-script .cgi .pl' >> $c_file +fi + +if [ "$f_aov" == "1" ] +then +echo 'AllowOverride All' >> $c_file +else +echo 'AllowOverride None' >> $c_file +fi + echo 'order deny,allow' >> $c_file echo 'deny from all' >> $c_file echo 'allow from all' >> $c_file @@ -704,21 +736,23 @@ if [ "$f_fop" == "1" ] then -echo 'php_flag register_globals on' >> $c_file +echo 'php_flag allow_url_fopen on' >> $c_file else -echo 'php_flag register_globals off' >> $c_file +echo 'php_flag allow_url_fopen off' >> $c_file fi if [ "$f_rgl" == "1" ] then -echo 'php_admin_flag allow_url_fopen on' >> $c_file +echo 'php_admin_flag register_globals on' >> $c_file else -echo 'php_admin_flag allow_url_fopen off' >> $c_file +echo 'php_admin_flag register_globals off' >> $c_file fi if [ "$f_eac" == "1" ] then echo 'php_admin_value eaccelerator.enable 1' >> $c_file +else +echo 'php_admin_value eaccelerator.enable 0' >> $c_file fi echo "php_admin_value open_basedir $open_bd" >> $c_file