Changeset 193

Show
Ignore:
Timestamp:
11/28/06 00:36:01 (2 years ago)
Author:
rats
Message:

- CONFIGS:

  • apache2-parts: added "IfModule? mod_fastcgi" tag

- ENGINE:

  • vhcs2-dmn-mngr: Added Comments
  • vhcs2-dmn-mngr: check wether awstats is enabled or not
  • vhcs2-dmn-mngr: FastCGI enhangements

- MAKEFILES:

  • edited them for FastC
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/CHANGELOG

    r190 r193  
    11VHCS 2.4.8 ω Omega Changelog 
    22~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     3 
     42006-11-27 Benedikt Heintel 
     5        - CONFIGS: 
     6                * apache2-parts: added "IfModule mod_fastcgi" tag 
     7        - ENGINE: 
     8                * vhcs2-dmn-mngr: Added Comments 
     9                * vhcs2-dmn-mngr: check wether awstats is enabled or not 
     10                * vhcs2-dmn-mngr: FastCGI enhangements 
     11        - MAKEFILES: 
     12                * edited them for FastCGI 
     13 
     14        @TODO: 
     15                - FastCGI: 
     16                        * Copy files on install/update 
     17                        * Check, if 2 php.ini-files are allowed and working 
     18                        * apache: check if stats are working with FastCGI 
     19                - AWStats: 
     20                        * apache: set statsdir if awstats is enabled 
     21                        * gui: disable stats-alias in client-menu 
    322 
    4232006-11-26 Roland Haeder 
     
    1433        - ENGINE: 
    1534                * Modified dmn-mngr for creating FastCGI files 
    16  
    17         @TODO: 
    18                 - FastCGI: 
    19                         * Copy files on install/update 
    20                         * Modifie dmn-mngr for working 
    21                 - AWStats: 
    22                         * dmn-mngr: check whether awstats is enabled or not 
    23                         * apache: set statsdir if awstats is enabled 
    2435 
    25362006-11-24 Benedikt Heintel 
  • trunk/Makefile

    r154 r193  
    1           
     1 
    22INST_PREF=/tmp/vhcs-2.4.8 
    33 
     
    1515 
    1616SYSTEM_VIRTUAL=$(INST_PREF)/var/www/virtual 
     17 
     18SYSTEM_FCGI=$(INST_PREF)/var/www/fcgi 
    1719 
    1820SYSTEM_MAIL_VIRTUAL=$(INST_PREF)/var/mail/virtual 
     
    3335        $(SYSTEM_MAKE_DIRS) $(SYSTEM_LOG)/vhcs2-arpl-msgr 
    3436        $(SYSTEM_MAKE_DIRS) $(SYSTEM_VIRTUAL) 
     37        $(SYSTEM_MAKE_DIRS) $(SYSTEM_FCGI) 
    3538        $(SYSTEM_MAKE_DIRS) $(SYSTEM_MAIL_VIRTUAL) 
    3639        $(SYSTEM_MAKE_DIRS) $(SYSTEM_APACHE_BACK_LOG) 
    3740 
    38         cd ./configs && $(MAKE) install  
    39         cd ./engine && $(MAKE) install  
    40         cd ./gui && $(MAKE) install  
     41        cd ./configs && $(MAKE) install 
     42        cd ./engine && $(MAKE) install 
     43        cd ./gui && $(MAKE) install 
    4144        cd ./keys && $(MAKE) install 
    42          
     45 
    4346uninstall: 
    4447 
    4548        cd ./tools && $(MAKE) uninstall 
    46         cd ./configs && $(MAKE) uninstall  
    47         cd ./engine && $(MAKE) uninstall  
    48         cd ./gui && $(MAKE) uninstall  
     49        cd ./configs && $(MAKE) uninstall 
     50        cd ./engine && $(MAKE) uninstall 
     51        cd ./gui && $(MAKE) uninstall 
    4952        cd ./keys && $(MAKE) uninstall 
    50          
     53 
    5154        rm -rf $(SYSTEM_CONF) 
    5255        rm -rf $(SYSTEM_ROOT) 
    5356        rm -rf $(SYSTEM_LOG) 
    5457        rm -rf $(SYSTEM_VIRTUAL) 
     58        rm -rf $(SYSTEM_FCGI) 
    5559        rm -rf $(SYSTEM_MAIL_VIRTUAL) 
    5660        rm -rf $(SYSTEM_APACHE_BACK_LOG) 
    5761        rm -rf ./*~ 
    58          
  • trunk/configs/apache/fastcgi.conf

    r191 r193  
     1# 
     2# @TODO: Test, if the php4.ini and php5.ini would work 
     3# 
     4 
    15<IfModule mod_fastcgi.c> 
    2   AddHandler fastcgi-script .fcgi 
    3   FastCgiWrapper /usr/lib/apache2/suexec2 
    4   FastCgiIpcDir /var/lib/apache2/fastcgi 
     6    FastCgiWrapper /usr/lib/apache2/suexec2 
     7    FastCgiIpcDir /var/lib/apache2/fastcgi 
    58 
    6   FastCgiConfig -minProcesses 1 -maxProcesses 10 -singleThreshold 100 -killInterval 300 -autoUpdate -idle-timeout 240 -pass-header HTTP_AUTHORIZATION 
     9    FastCgiConfig -minProcesses 1 -maxProcesses 10 -singleThreshold 100 -killInterval 300 -autoUpdate -idle-timeout 240 -pass-header HTTP_AUTHORIZATION 
    710 
    8   <Location /php/> 
    9      Options ExecCGI 
    10      SetHandler fastcgi-script 
    11   </Location> 
     11    FastCgiServer /var/www/fcgi/master/php4-fcgi-starter -user vu2001 -group vu2001 
     12 
     13    Action php4-fcgi-starter /php4/php4-fcgi-starter 
     14    Action php5-fcgi-starter /php5/php5-fcgi-starter 
     15 
     16    # For PHP4 support 
     17    <Location /php4/> 
     18       Options +ExecCGI 
     19       SetHandler php4-fcgi-starter 
     20    </Location> 
     21    AddType application/x-httpd-php4 .php .php3 .php4 
     22    Action /php4/php4.ini 
     23 
     24    # For PHP5 support 
     25    <Location /php5/> 
     26       Options +ExecCGI 
     27       SetHandler php5-fcgi-starter 
     28    </Location> 
     29    AddType application/x-httpd-php5 .php5 
     30    Action /php5/php5.ini 
     31 
     32    AddHandler php4-fastcgi .php .php4 .php3 
     33    AddHandler php5-fastcgi .php5 
    1234 
    1335</IfModule> 
  • trunk/configs/apache/parts/als_entry.tpl

    r157 r193  
    55    #Group {SUEXEC_GROUP} 
    66    # 
    7      
    8     # 
     7 
    98    SuexecUserGroup {SUEXEC_USER} {SUEXEC_GROUP} 
    10     # 
    119 
    1210    ServerAdmin     root@{ALS_NAME} 
     
    3129    # httpd als entry redirect entry BEGIN. 
    3230    # httpd als entry redirect entry END. 
    33        
     31 
    3432    # httpd als entry cgi support BEGIN. 
    3533    # httpd als entry cgi support END. 
    3634 
    37     <Directory {GUI_ROOT_DIR}> 
    38         <IfModule mod_php.c> 
     35    <IfModule mod_fastcgi.c> 
     36        ScriptAlias /php4/ {STARTER_DIR}/{DMN_NAME}/ 
     37        <Directory "{STARTER_DIR}/{DMN_NAME}"> 
     38            AllowOverride None 
     39            Options +ExecCGI -MultiViews -Indexes 
     40            Order allow,deny 
     41            Allow from all 
     42        </Directory> 
     43 
     44        ScriptAlias /php5/ {STARTER_DIR}/{DMN_NAME}/ 
     45        <Directory "{STARTER_DIR}/{DMN_NAME}"> 
     46            AllowOverride None 
     47            Options +ExecCGI -MultiViews -Indexes 
     48            Order allow,deny 
     49            Allow from all 
     50        </Directory> 
     51    </IfModule> 
     52 
     53    <IfModule mod_php.c> 
     54        <Directory {GUI_ROOT_DIR}> 
    3955            php_admin_value open_basedir "{GUI_ROOT_DIR}/:/etc/vhcs2/:/proc/:{WWW_DIR}/:/tmp/:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin" 
    4056            php_admin_value session.save_path "/tmp/" 
    41           </IfModule
    42     </Directory
     57        </Directory
     58    </IfModule
    4359 
    4460    # httpd als entry PHP2 support BEGIN. 
  • trunk/configs/apache/parts/dmn_entry.tpl

    r176 r193  
    22 
    33    # 
    4     #User {SUEXEC_USER} 
    5     #Group {SUEXEC_GROUP} 
     4    # User {SUEXEC_USER} 
     5    # Group {SUEXEC_GROUP} 
    66    # 
    77 
    8     # 
    98    SuexecUserGroup {SUEXEC_USER} {SUEXEC_GROUP} 
    10     # 
    119 
    1210    ServerAdmin     root@{DMN_NAME} 
     
    3432    # httpd dmn entry cgi support END. 
    3533 
    36     ScriptAlias /php/ {STARTER_DIR}/{DMN_NAME}/ 
    37     <Directory "{STARTER_DIR}/{DMN_NAME}"> 
    38         AllowOverride None 
    39         Options +ExecCGI -MultiViews -Indexes 
    40         Order allow,deny 
    41         Allow from all 
    42     </Directory> 
     34    <IfModule mod_fastcgi.c> 
     35        ScriptAlias /php4/ {STARTER_DIR}/{DMN_NAME}/ 
     36        <Directory "{STARTER_DIR}/{DMN_NAME}"> 
     37            AllowOverride None 
     38            Options +ExecCGI -MultiViews -Indexes 
     39            Order allow,deny 
     40            Allow from all 
     41        </Directory> 
    4342 
    44     <Directory {GUI_ROOT_DIR}> 
    45         <IfModule mod_php.c> 
     43        ScriptAlias /php5/ {STARTER_DIR}/{DMN_NAME}/ 
     44        <Directory "{STARTER_DIR}/{DMN_NAME}"> 
     45            AllowOverride None 
     46            Options +ExecCGI -MultiViews -Indexes 
     47            Order allow,deny 
     48            Allow from all 
     49        </Directory> 
     50    </IfModule> 
     51 
     52    <IfModule mod_php.c> 
     53        <Directory {GUI_ROOT_DIR}> 
    4654            php_admin_value open_basedir "{GUI_ROOT_DIR}/:/etc/vhcs2/:/proc/:{WWW_DIR}/:/tmp/:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin" 
    4755            php_admin_value session.save_path "/tmp/" 
    48           </IfModule
    49     </Directory
     56        </Directory
     57    </IfModule
    5058 
    5159    # httpd dmn entry PHP2 support BEGIN. 
  • trunk/configs/apache/parts/sub_entry.tpl

    r168 r193  
    55    #Group {SUEXEC_GROUP} 
    66    # 
    7      
     7 
    88    # 
    99    SuexecUserGroup {SUEXEC_USER} {SUEXEC_GROUP} 
     
    1212    ServerAdmin     root@{DMN_NAME} 
    1313    DocumentRoot    {WWW_DIR}/{DMN_NAME}{MOUNT_POINT}/htdocs 
    14      
     14 
    1515    ServerName      {SUB_NAME} 
    1616    ServerAlias     www.{SUB_NAME} {SUB_NAME} *.{SUB_NAME} 
    17      
     17 
    1818    ErrorLog        {APACHE_USERS_LOG_DIR}/{SUB_NAME}-error.log 
    1919    TransferLog     {APACHE_USERS_LOG_DIR}/{SUB_NAME}-access.log 
    20      
     20 
    2121    CustomLog       {APACHE_LOG_DIR}/{DMN_NAME}-traf.log traff 
    2222    CustomLog       {APACHE_LOG_DIR}/{DMN_NAME}-combined.log combined 
     
    3838    # httpd sub entry cgi support END. 
    3939 
    40     ScriptAlias /php/ {STARTER_DIR}/{DMN_NAME}/ 
    41     <Directory "{STARTER_DIR}/{DMN_NAME}"> 
    42         AllowOverride None 
    43         Options +ExecCGI -MultiViews -Indexes 
    44         Order allow,deny 
    45         Allow from all 
    46     </Directory> 
     40    <IfModule mod_fastcgi.c> 
     41        ScriptAlias /php4/ {STARTER_DIR}/{DMN_NAME}/ 
     42        <Directory "{STARTER_DIR}/{DMN_NAME}"> 
     43            AllowOverride None 
     44            Options +ExecCGI -MultiViews -Indexes 
     45            Order allow,deny 
     46            Allow from all 
     47        </Directory> 
    4748 
    48     <Directory {GUI_ROOT_DIR}> 
    49         <IfModule mod_php.c> 
     49        ScriptAlias /php5/ {STARTER_DIR}/{DMN_NAME}/ 
     50        <Directory "{STARTER_DIR}/{DMN_NAME}"> 
     51            AllowOverride None 
     52            Options +ExecCGI -MultiViews -Indexes 
     53            Order allow,deny 
     54            Allow from all 
     55        </Directory> 
     56    </IfModule> 
     57 
     58    <IfModule mod_php.c> 
     59        <Directory {GUI_ROOT_DIR}> 
    5060            php_admin_value open_basedir "{GUI_ROOT_DIR}/:/etc/vhcs2/:/proc/:{WWW_DIR}/:/tmp/:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin" 
    5161            php_admin_value session.save_path "/tmp/" 
    52         </IfModule
    53     </Directory
     62        </Directory
     63    </IfModule
    5464 
    5565    # httpd sub entry PHP2 support BEGIN. 
    5666    # httpd sub entry PHP2 support END. 
    57      
     67 
    5868    <Directory {WWW_DIR}/{DMN_NAME}{MOUNT_POINT}/htdocs> 
    5969        # httpd sub entry PHP support BEGIN. 
     
    6474        Allow from all 
    6575    </Directory> 
    66      
     76 
    6777</VirtualHost> 
  • trunk/configs/vhcs2.conf

    r190 r193  
    295295USER_LAYOUT_ID = 1 
    296296 
    297 VHCS_LICENSE = VHCS<sup>&reg;</sup> Pro v2.4.8<br />build: 2006-08-15<br />Rhea 
     297VHCS_LICENSE = VHCS<sup>&reg;</sup> Pro v2.4.8<br />build: 2006-11-30<br />Rhea 
    298298 
    299299MINIMAL_FTP_UID = 2000 
  • trunk/engine/vhcs2-dmn-mngr

    r192 r193  
    17481748        my $starter_dir = $main::cfg{'PHP_STARTER_DIR'}; 
    17491749 
    1750         my $fastcgi_target = $main::cfg{'APACHE_MOD_FASTCGI'}; 
     1750        # Should be created on install! (delete if okay) 
     1751        #my $fastcgi_target = $main::cfg{'APACHE_MOD_FASTCGI'}; 
    17511752 
    17521753        my $conf_dir = $main::cfg{'CONF_DIR'}; 
     
    17681769        # 
    17691770 
    1770         $rs = make_dir( 
    1771                                         "$starter_dir", 
    1772                                         $httpd_uid, 
    1773                                         $httpd_gid, 
    1774                                         0755 
    1775                                         ); 
    1776  
    1777         return $rs if ($rs != 0); 
     1771        # Should be created on install! (delete if okay) 
     1772        #$rs = make_dir( 
     1773        #                               "$starter_dir", 
     1774        #                               $httpd_uid, 
     1775        #                               $httpd_gid, 
     1776        #                               0755 
     1777        #                               ); 
     1778        # 
     1779        #return $rs if ($rs != 0); 
    17781780 
    17791781        if (!(-e "$starter_dir/master")) { 
     
    20152017        } 
    20162018 
     2019        # Should be created on install! (delete if okay) 
    20172020        # 
    20182021        # fastcgi.conf for apache 
     
    20432046 
    20442047        # 
    2045         # php.ini for every domain 
     2048        # php.ini/php-fcgi-starter for "master" (FCGI-Server) 
    20462049        # 
    2047         if (!(-e "$starter_dir/$dmn_name/php.ini")) { 
     2050        if (!(-e "$starter_dir/master/php5.ini")) { 
    20482051 
    20492052                my $ini_tpl = ''; 
    20502053 
    2051                 ($rs, $ini_tpl) = get_file("$conf_dir/php/parts/php.ini"); 
    2052  
    2053                 return $rs if ($rs != 0); 
    2054  
     2054                ($rs, $ini_tpl) = get_file("$conf_dir/fcgi/parts/php5.ini"); 
     2055 
     2056                return $rs if ($rs != 0); 
     2057 
     2058                $ini_tpl =~ s/{WWW_DIR}/$www_dir/gi; 
    20552059                $ini_tpl =~ s/{PEAR_DIR}/$pear_dir/gi; 
    2056                 $ini_tpl =~ s/{WWW_DIR}/$www_dir/gi; 
    2057                 $ini_tpl =~ s/{DMN_NAME}/$dmn_name/gi; 
     2060                $ini_tpl =~ s/{DMN_NAME}/master/gi; 
    20582061 
    20592062                ($rs, $rdata) = store_file( 
    2060                                                                         "$starter_dir/$dmn_name/php.ini", 
     2063                                                                        "$starter_dir/master/php5.ini", 
    20612064                                                                        $ini_tpl, 
    20622065                                                                        $sys_user, 
     
    20672070                return $rs if ($rs != 0); 
    20682071 
     2072                $ini_tpl = ''; 
     2073 
     2074                ($rs, $ini_tpl) = get_file("$conf_dir/fcgi/parts/php4.ini"); 
     2075 
     2076                return $rs if ($rs != 0); 
     2077 
     2078                $ini_tpl =~ s/{WWW_DIR}/$www_dir/gi; 
     2079                $ini_tpl =~ s/{PEAR_DIR}/$pear_dir/gi; 
     2080                $ini_tpl =~ s/{DMN_NAME}/master/gi; 
     2081 
     2082                ($rs, $rdata) = store_file( 
     2083                                                                        "$starter_dir/master/php4.ini", 
     2084                                                                        $ini_tpl, 
     2085                                                                        $sys_user, 
     2086                                                                        $sys_group, 
     2087                                                                        0640 
     2088                                                                        ); 
     2089 
     2090                return $rs if ($rs != 0); 
     2091 
    20692092        } 
    20702093 
    20712094        # 
    2072         # php5-fcgi-starter for every domain 
     2095        # php.ini for the new domain 
     2096        # 
     2097        if (!(-e "$starter_dir/$dmn_name/php5.ini")) { 
     2098 
     2099                my $ini_tpl = ''; 
     2100 
     2101                ($rs, $ini_tpl) = get_file("$conf_dir/fcgi/parts/php4.ini"); 
     2102 
     2103                return $rs if ($rs != 0); 
     2104 
     2105                $ini_tpl =~ s/{PEAR_DIR}/$pear_dir/gi; 
     2106                $ini_tpl =~ s/{WWW_DIR}/$www_dir/gi; 
     2107                $ini_tpl =~ s/{DMN_NAME}/$dmn_name/gi; 
     2108 
     2109                ($rs, $rdata) = store_file( 
     2110                                                                        "$starter_dir/$dmn_name/php4.ini", 
     2111                                                                        $ini_tpl, 
     2112                                                                        $sys_user, 
     2113                                                                        $sys_group, 
     2114                                                                        0640 
     2115                                                                        ); 
     2116 
     2117                return $rs if ($rs != 0); 
     2118 
     2119                $ini_tpl = ''; 
     2120 
     2121                ($rs, $ini_tpl) = get_file("$conf_dir/fcgi/parts/php5.ini"); 
     2122 
     2123                return $rs if ($rs != 0); 
     2124 
     2125                $ini_tpl =~ s/{PEAR_DIR}/$pear_dir/gi; 
     2126                $ini_tpl =~ s/{WWW_DIR}/$www_dir/gi; 
     2127                $ini_tpl =~ s/{DMN_NAME}/$dmn_name/gi; 
     2128 
     2129                ($rs, $rdata) = store_file( 
     2130                                                                        "$starter_dir/$dmn_name/php5.ini", 
     2131                                                                        $ini_tpl, 
     2132                                                                        $sys_user, 
     2133                                                                        $sys_group, 
     2134                                                                        0640 
     2135                                                                        ); 
     2136 
     2137                return $rs if ($rs != 0); 
     2138 
     2139        } 
     2140 
     2141        # 
     2142        # php-fcgi-starters for every domain 
    20732143        # 
    20742144        if (!(-e "$starter_dir/$dmn_name/php5-fcgi-starter")) { 
     
    20762146                my $starter_tpl = ''; 
    20772147 
    2078                 ($rs, $starter_tpl) = get_file("$conf_dir/php/parts/php5-fcgi-starter.tpl"); 
     2148                ($rs, $starter_tpl) = get_file("$conf_dir/fcgi/parts/php5-fcgi-starter.tpl"); 
    20792149 
    20802150                return $rs if ($rs != 0); 
     
    20932163                return $rs if ($rs != 0); 
    20942164 
     2165                $starter_tpl = ''; 
     2166 
     2167                ($rs, $starter_tpl) = get_file("$conf_dir/fcgi/parts/php4-fcgi-starter.tpl"); 
     2168 
     2169                return $rs if ($rs != 0); 
     2170 
     2171                $starter_tpl =~ s/{PHP_STARTER_DIR}/$starter_dir/gi; 
     2172                $starter_tpl =~ s/{DMN_NAME}/$dmn_name/gi; 
     2173 
     2174                ($rs, $rdata) = store_file( 
     2175                                                                        "$starter_dir/$dmn_name/php4-fcgi-starter", 
     2176                                                                        $starter_tpl, 
     2177                                                                        $sys_user, 
     2178                                                                        $sys_group, 
     2179                                                                        0750 
     2180                                                                        ); 
     2181 
     2182                return $rs if ($rs != 0); 
     2183 
    20952184        } 
    20962185 
     
    21342223        my $starter_dir = $main::cfg{'PHP_STARTER_DIR'}; 
    21352224 
    2136         my $fastcgi_target = $main::cfg{'APACHE_MOD_FASTCGI'}; 
     2225        # Should be created on install! (delete if okay) 
     2226        #my $fastcgi_target = $main::cfg{'APACHE_MOD_FASTCGI'}; 
    21372227 
    21382228        my $conf_dir = $main::cfg{'CONF_DIR'}; 
     
    22032293        } 
    22042294 
     2295        # Should be created on install! (delete if okay) 
    22052296        # 
    22062297        # fastcgi.conf for apache 
     
    22312322 
    22322323        # 
    2233         # php.ini/php5-fcgi-starter for "master" (FCGI-Server) 
     2324        # php.ini/php-fcgi-starter for "master" (FCGI-Server) 
    22342325        # 
    2235         if (!(-e "$starter_dir/master/php.ini")) { 
     2326        if (!(-e "$starter_dir/master/php5.ini")) { 
    22362327 
    22372328                my $ini_tpl = ''; 
    22382329 
    2239                 ($rs, $ini_tpl) = get_file("$conf_dir/php/parts/php.ini"); 
     2330                ($rs, $ini_tpl) = get_file("$conf_dir/fcgi/parts/php5.ini"); 
    22402331 
    22412332                return $rs if ($rs != 0); 
     
    22462337 
    22472338                ($rs, $rdata) = store_file( 
    2248                                                                         "$starter_dir/master/php.ini", 
     2339                                                                        "$starter_dir/master/php5.ini", 
    22492340                                                                        $ini_tpl, 
    22502341                                                                        $sys_user, 
     
    22552346                return $rs if ($rs != 0); 
    22562347 
     2348                $ini_tpl = ''; 
     2349 
     2350                ($rs, $ini_tpl) = get_file("$conf_dir/fcgi/parts/php4.ini"); 
     2351 
     2352                return $rs if ($rs != 0); 
     2353 
     2354                $ini_tpl =~ s/{WWW_DIR}/$www_dir/gi; 
     2355                $ini_tpl =~ s/{PEAR_DIR}/$pear_dir/gi; 
     2356                $ini_tpl =~ s/{DMN_NAME}/master/gi; 
     2357 
     2358                ($rs, $rdata) = store_file( 
     2359                                                                        "$starter_dir/master/php4.ini", 
     2360                                                                        $ini_tpl, 
     2361                                                                        $sys_user, 
     2362                                                                        $sys_group, 
     2363                                                                        0640 
     2364                                                                        ); 
     2365 
     2366                return $rs if ($rs != 0); 
     2367 
    22572368        } 
    22582369 
     
    22612372                my $starter_tpl = ''; 
    22622373 
    2263                 ($rs, $starter_tpl) = get_file("$conf_dir/php/parts/php5-fcgi-starter.tpl"); 
     2374                ($rs, $starter_tpl) = get_file("$conf_dir/fcgi/parts/php5-fcgi-starter.tpl"); 
    22642375 
    22652376                return $rs if ($rs != 0); 
     
    22782389                return $rs if ($rs != 0); 
    22792390 
     2391                $starter_tpl = ''; 
     2392 
     2393                ($rs, $starter_tpl) = get_file("$conf_dir/fcgi/parts/php4-fcgi-starter.tpl"); 
     2394 
     2395                return $rs if ($rs != 0); 
     2396 
     2397                $starter_tpl =~ s/{PHP_STARTER_DIR}/$starter_dir/gi; 
     2398                $starter_tpl =~ s/{DMN_NAME}/master/gi; 
     2399 
     2400                ($rs, $rdata) = store_file( 
     2401                                                                        "$starter_dir/master/php4-fcgi-starter", 
     2402                                                                        $starter_tpl, 
     2403                                                                        $sys_user, 
     2404                                                                        $sys_group, 
     2405                                                                        0750 
     2406                                                                        ); 
     2407 
     2408                return $rs if ($rs != 0); 
     2409 
    22802410        } 
    22812411 
    22822412        # 
    2283         # php.ini for every domain 
     2413        # php.ini for the domain 
    22842414        # 
    2285         if (!(-e "$starter_dir/$dmn_name/php.ini")) { 
     2415        if (!(-e "$starter_dir/$dmn_name/php5.ini")) { 
    22862416 
    22872417                my $ini_tpl = ''; 
    22882418 
    2289                 ($rs, $ini_tpl) = get_file("$conf_dir/php/parts/php.ini"); 
     2419                ($rs, $ini_tpl) = get_file("$conf_dir/fcgi/parts/php5.ini"); 
    22902420 
    22912421                return $rs if ($rs != 0); 
     
    22962426 
    22972427                ($rs, $rdata) = store_file( 
    2298                                                                         "$starter_dir/$dmn_name/php.ini", 
     2428                                                                        "$starter_dir/$dmn_name/php5.ini", 
    22992429                                                                        $ini_tpl, 
    23002430                                                                        $sys_user, 
    23012431                                                                        $sys_group, 
    2302                                                                         066
     2432                                                                        064
    23032433                                                                        ); 
    23042434 
    23052435                return $rs if ($rs != 0); 
    23062436 
     2437                $ini_tpl = ''; 
     2438 
     2439                ($rs, $ini_tpl) = get_file("$conf_dir/fcgi/parts/php4.ini"); 
     2440 
     2441                return $rs if ($rs != 0); 
     2442 
     2443                $ini_tpl =~ s/{WWW_DIR}/$www_dir/gi; 
     2444                $ini_tpl =~ s/{PEAR_DIR}/$pear_dir/gi; 
     2445                $ini_tpl =~ s/{DMN_NAME}/$dmn_name/gi; 
     2446 
     2447                ($rs, $rdata) = store_file( 
     2448                                                                        "$starter_dir/$dmn_name/php4.ini", 
     2449                                                                        $ini_tpl, 
     2450                                                                        $sys_user, 
     2451                                                                        $sys_group, 
     2452                                                                        0640 
     2453                                                                        ); 
     2454 
     2455                return $rs if ($rs != 0); 
    23072456        } 
    23082457 
     
    23142463                my $starter_tpl = ''; 
    23152464 
    2316                 ($rs, $starter_tpl) = get_file("$conf_dir/php/parts/php5-fcgi-starter.tpl"); 
     2465                ($rs, $starter_tpl) = get_file("$conf_dir/fcgi/parts/php5-fcgi-starter.tpl"); 
    23172466 
    23182467                return $rs if ($rs != 0); 
     
    23232472                ($rs, $rdata) = store_file( 
    23242473                                                                        "$starter_dir/$dmn_name/php5-fcgi-starter", 
     2474                                                                        $starter_tpl, 
     2475                                                                        $sys_user, 
     2476                                                                        $sys_group, 
     2477                                                                        0750 
     2478                                                                        ); 
     2479 
     2480                return $rs if ($rs != 0); 
     2481 
     2482                $starter_tpl = ''; 
     2483 
     2484                ($rs, $starter_tpl) = get_file("$conf_dir/fcgi/parts/php4-fcgi-starter.tpl"); 
     2485 
     2486                return $rs if ($rs != 0); 
     2487 
     2488                $starter_tpl =~ s/{PHP_STARTER_DIR}/$starter_dir/gi; 
     2489                $starter_tpl =~ s/{DMN_NAME}/$dmn_name/gi; 
     2490 
     2491                ($rs, $rdata) = store_file( 
     2492                                                                        "$starter_dir/$dmn_name/php4-fcgi-starter", 
    23252493                                                                        $starter_tpl, 
    23262494                                                                        $sys_user, 
     
    34973665    my $rs = undef; 
    34983666 
     3667    my $awstats_dir = $main::cfg{'AWSTATS_DIR'}; 
     3668 
    34993669    push_el(\@main::el, 'dmn_add_data()', 'Starting...'); 
    35003670 
     
    35193689    return $rs if ($rs != 0); 
    35203690 
    3521     $rs = dmn_add_awstats_data($dmn_data); 
    3522  
    3523     return $rs if ($rs != 0); 
    3524  
     3691        # check wether AWStats is enabled 
     3692        if ($awstats_dir != 'no') { 
     3693        $rs = dmn_add_awstats_data($dmn_data); 
     3694 
     3695                return $rs if ($rs != 0); 
     3696        } 
    35253697 
    35263698#     $rs = dmn_add_crontab_data($dmn_data); 
     
    35673739    return $rs if ($rs != 0); 
    35683740 
    3569  
    3570     $rs = dmn_change_awstats_data($dmn_data); 
    3571  
    3572     return $rs if ($rs != 0); 
     3741        # check wether AWStats is enabled 
     3742        if ($awstats_dir != 'no') { 
     3743        $rs = dmn_change_awstats_data($dmn_data); 
     3744 
     3745                return $rs if ($rs != 0); 
     3746        } 
    35733747 
    35743748    push_el(\@main::el, 'dmn_change_data()', 'Ending...'); 
     
    36113785    return $rs if ($rs != 0); 
    36123786 
    3613     $rs = dmn_del_awstats_data($dmn_data); 
    3614  
    3615     return $rs if ($rs != 0); 
    3616  
     3787        # check wether AWStats is enabled 
     3788        if ($awstats_dir != 'no') { 
     3789        $rs = dmn_del_awstats_data($dmn_data); 
     3790 
     3791        return $rs if ($rs != 0); 
     3792        } 
    36173793 
    36183794#     $rs = dmn_del_crontab_data($dmn_data);