Changeset 193
- 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:
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r190 |
r193 |
|
| 1 | 1 | VHCS 2.4.8 ω Omega Changelog |
|---|
| 2 | 2 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| | 3 | |
|---|
| | 4 | 2006-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 |
|---|
| 3 | 22 | |
|---|
| 4 | 23 | 2006-11-26 Roland Haeder |
|---|
| … | … | |
| 14 | 33 | - ENGINE: |
|---|
| 15 | 34 | * 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 |
|---|
| 24 | 35 | |
|---|
| 25 | 36 | 2006-11-24 Benedikt Heintel |
|---|
| r154 |
r193 |
|
| 1 | | |
|---|
| | 1 | |
|---|
| 2 | 2 | INST_PREF=/tmp/vhcs-2.4.8 |
|---|
| 3 | 3 | |
|---|
| … | … | |
| 15 | 15 | |
|---|
| 16 | 16 | SYSTEM_VIRTUAL=$(INST_PREF)/var/www/virtual |
|---|
| | 17 | |
|---|
| | 18 | SYSTEM_FCGI=$(INST_PREF)/var/www/fcgi |
|---|
| 17 | 19 | |
|---|
| 18 | 20 | SYSTEM_MAIL_VIRTUAL=$(INST_PREF)/var/mail/virtual |
|---|
| … | … | |
| 33 | 35 | $(SYSTEM_MAKE_DIRS) $(SYSTEM_LOG)/vhcs2-arpl-msgr |
|---|
| 34 | 36 | $(SYSTEM_MAKE_DIRS) $(SYSTEM_VIRTUAL) |
|---|
| | 37 | $(SYSTEM_MAKE_DIRS) $(SYSTEM_FCGI) |
|---|
| 35 | 38 | $(SYSTEM_MAKE_DIRS) $(SYSTEM_MAIL_VIRTUAL) |
|---|
| 36 | 39 | $(SYSTEM_MAKE_DIRS) $(SYSTEM_APACHE_BACK_LOG) |
|---|
| 37 | 40 | |
|---|
| 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 |
|---|
| 41 | 44 | cd ./keys && $(MAKE) install |
|---|
| 42 | | |
|---|
| | 45 | |
|---|
| 43 | 46 | uninstall: |
|---|
| 44 | 47 | |
|---|
| 45 | 48 | 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 |
|---|
| 49 | 52 | cd ./keys && $(MAKE) uninstall |
|---|
| 50 | | |
|---|
| | 53 | |
|---|
| 51 | 54 | rm -rf $(SYSTEM_CONF) |
|---|
| 52 | 55 | rm -rf $(SYSTEM_ROOT) |
|---|
| 53 | 56 | rm -rf $(SYSTEM_LOG) |
|---|
| 54 | 57 | rm -rf $(SYSTEM_VIRTUAL) |
|---|
| | 58 | rm -rf $(SYSTEM_FCGI) |
|---|
| 55 | 59 | rm -rf $(SYSTEM_MAIL_VIRTUAL) |
|---|
| 56 | 60 | rm -rf $(SYSTEM_APACHE_BACK_LOG) |
|---|
| 57 | 61 | rm -rf ./*~ |
|---|
| 58 | | |
|---|
| r191 |
r193 |
|
| | 1 | # |
|---|
| | 2 | # @TODO: Test, if the php4.ini and php5.ini would work |
|---|
| | 3 | # |
|---|
| | 4 | |
|---|
| 1 | 5 | <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 |
|---|
| 5 | 8 | |
|---|
| 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 |
|---|
| 7 | 10 | |
|---|
| 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 |
|---|
| 12 | 34 | |
|---|
| 13 | 35 | </IfModule> |
|---|
| r157 |
r193 |
|
| 5 | 5 | #Group {SUEXEC_GROUP} |
|---|
| 6 | 6 | # |
|---|
| 7 | | |
|---|
| 8 | | # |
|---|
| | 7 | |
|---|
| 9 | 8 | SuexecUserGroup {SUEXEC_USER} {SUEXEC_GROUP} |
|---|
| 10 | | # |
|---|
| 11 | 9 | |
|---|
| 12 | 10 | ServerAdmin root@{ALS_NAME} |
|---|
| … | … | |
| 31 | 29 | # httpd als entry redirect entry BEGIN. |
|---|
| 32 | 30 | # httpd als entry redirect entry END. |
|---|
| 33 | | |
|---|
| | 31 | |
|---|
| 34 | 32 | # httpd als entry cgi support BEGIN. |
|---|
| 35 | 33 | # httpd als entry cgi support END. |
|---|
| 36 | 34 | |
|---|
| 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}> |
|---|
| 39 | 55 | 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" |
|---|
| 40 | 56 | php_admin_value session.save_path "/tmp/" |
|---|
| 41 | | </IfModule> |
|---|
| 42 | | </Directory> |
|---|
| | 57 | </Directory> |
|---|
| | 58 | </IfModule> |
|---|
| 43 | 59 | |
|---|
| 44 | 60 | # httpd als entry PHP2 support BEGIN. |
|---|
| r176 |
r193 |
|
| 2 | 2 | |
|---|
| 3 | 3 | # |
|---|
| 4 | | #User {SUEXEC_USER} |
|---|
| 5 | | #Group {SUEXEC_GROUP} |
|---|
| | 4 | # User {SUEXEC_USER} |
|---|
| | 5 | # Group {SUEXEC_GROUP} |
|---|
| 6 | 6 | # |
|---|
| 7 | 7 | |
|---|
| 8 | | # |
|---|
| 9 | 8 | SuexecUserGroup {SUEXEC_USER} {SUEXEC_GROUP} |
|---|
| 10 | | # |
|---|
| 11 | 9 | |
|---|
| 12 | 10 | ServerAdmin root@{DMN_NAME} |
|---|
| … | … | |
| 34 | 32 | # httpd dmn entry cgi support END. |
|---|
| 35 | 33 | |
|---|
| 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> |
|---|
| 43 | 42 | |
|---|
| 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}> |
|---|
| 46 | 54 | 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" |
|---|
| 47 | 55 | php_admin_value session.save_path "/tmp/" |
|---|
| 48 | | </IfModule> |
|---|
| 49 | | </Directory> |
|---|
| | 56 | </Directory> |
|---|
| | 57 | </IfModule> |
|---|
| 50 | 58 | |
|---|
| 51 | 59 | # httpd dmn entry PHP2 support BEGIN. |
|---|
| r168 |
r193 |
|
| 5 | 5 | #Group {SUEXEC_GROUP} |
|---|
| 6 | 6 | # |
|---|
| 7 | | |
|---|
| | 7 | |
|---|
| 8 | 8 | # |
|---|
| 9 | 9 | SuexecUserGroup {SUEXEC_USER} {SUEXEC_GROUP} |
|---|
| … | … | |
| 12 | 12 | ServerAdmin root@{DMN_NAME} |
|---|
| 13 | 13 | DocumentRoot {WWW_DIR}/{DMN_NAME}{MOUNT_POINT}/htdocs |
|---|
| 14 | | |
|---|
| | 14 | |
|---|
| 15 | 15 | ServerName {SUB_NAME} |
|---|
| 16 | 16 | ServerAlias www.{SUB_NAME} {SUB_NAME} *.{SUB_NAME} |
|---|
| 17 | | |
|---|
| | 17 | |
|---|
| 18 | 18 | ErrorLog {APACHE_USERS_LOG_DIR}/{SUB_NAME}-error.log |
|---|
| 19 | 19 | TransferLog {APACHE_USERS_LOG_DIR}/{SUB_NAME}-access.log |
|---|
| 20 | | |
|---|
| | 20 | |
|---|
| 21 | 21 | CustomLog {APACHE_LOG_DIR}/{DMN_NAME}-traf.log traff |
|---|
| 22 | 22 | CustomLog {APACHE_LOG_DIR}/{DMN_NAME}-combined.log combined |
|---|
| … | … | |
| 38 | 38 | # httpd sub entry cgi support END. |
|---|
| 39 | 39 | |
|---|
| 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> |
|---|
| 47 | 48 | |
|---|
| 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}> |
|---|
| 50 | 60 | 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" |
|---|
| 51 | 61 | php_admin_value session.save_path "/tmp/" |
|---|
| 52 | | </IfModule> |
|---|
| 53 | | </Directory> |
|---|
| | 62 | </Directory> |
|---|
| | 63 | </IfModule> |
|---|
| 54 | 64 | |
|---|
| 55 | 65 | # httpd sub entry PHP2 support BEGIN. |
|---|
| 56 | 66 | # httpd sub entry PHP2 support END. |
|---|
| 57 | | |
|---|
| | 67 | |
|---|
| 58 | 68 | <Directory {WWW_DIR}/{DMN_NAME}{MOUNT_POINT}/htdocs> |
|---|
| 59 | 69 | # httpd sub entry PHP support BEGIN. |
|---|
| … | … | |
| 64 | 74 | Allow from all |
|---|
| 65 | 75 | </Directory> |
|---|
| 66 | | |
|---|
| | 76 | |
|---|
| 67 | 77 | </VirtualHost> |
|---|
| r190 |
r193 |
|
| 295 | 295 | USER_LAYOUT_ID = 1 |
|---|
| 296 | 296 | |
|---|
| 297 | | VHCS_LICENSE = VHCS<sup>®</sup> Pro v2.4.8<br />build: 2006-08-15<br />Rhea |
|---|
| | 297 | VHCS_LICENSE = VHCS<sup>®</sup> Pro v2.4.8<br />build: 2006-11-30<br />Rhea |
|---|
| 298 | 298 | |
|---|
| 299 | 299 | MINIMAL_FTP_UID = 2000 |
|---|
| r192 |
r193 |
|
| 1748 | 1748 | my $starter_dir = $main::cfg{'PHP_STARTER_DIR'}; |
|---|
| 1749 | 1749 | |
|---|
| 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'}; |
|---|
| 1751 | 1752 | |
|---|
| 1752 | 1753 | my $conf_dir = $main::cfg{'CONF_DIR'}; |
|---|
| … | … | |
| 1768 | 1769 | # |
|---|
| 1769 | 1770 | |
|---|
| 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); |
|---|
| 1778 | 1780 | |
|---|
| 1779 | 1781 | if (!(-e "$starter_dir/master")) { |
|---|
| … | … | |
| 2015 | 2017 | } |
|---|
| 2016 | 2018 | |
|---|
| | 2019 | # Should be created on install! (delete if okay) |
|---|
| 2017 | 2020 | # |
|---|
| 2018 | 2021 | # fastcgi.conf for apache |
|---|
| … | … | |
| 2043 | 2046 | |
|---|
| 2044 | 2047 | # |
|---|
| 2045 | | # php.ini for every domain |
|---|
| | 2048 | # php.ini/php-fcgi-starter for "master" (FCGI-Server) |
|---|
| 2046 | 2049 | # |
|---|
| 2047 | | if (!(-e "$starter_dir/$dmn_name/php.ini")) { |
|---|
| | 2050 | if (!(-e "$starter_dir/master/php5.ini")) { |
|---|
| 2048 | 2051 | |
|---|
| 2049 | 2052 | my $ini_tpl = ''; |
|---|
| 2050 | 2053 | |
|---|
| 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; |
|---|
| 2055 | 2059 | $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; |
|---|
| 2058 | 2061 | |
|---|
| 2059 | 2062 | ($rs, $rdata) = store_file( |
|---|
| 2060 | | "$starter_dir/$dmn_name/php.ini", |
|---|
| | 2063 | "$starter_dir/master/php5.ini", |
|---|
| 2061 | 2064 | $ini_tpl, |
|---|
| 2062 | 2065 | $sys_user, |
|---|
| … | … | |
| 2067 | 2070 | return $rs if ($rs != 0); |
|---|
| 2068 | 2071 | |
|---|
| | 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 | |
|---|
| 2069 | 2092 | } |
|---|
| 2070 | 2093 | |
|---|
| 2071 | 2094 | # |
|---|
| 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 |
|---|
| 2073 | 2143 | # |
|---|
| 2074 | 2144 | if (!(-e "$starter_dir/$dmn_name/php5-fcgi-starter")) { |
|---|
| … | … | |
| 2076 | 2146 | my $starter_tpl = ''; |
|---|
| 2077 | 2147 | |
|---|
| 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"); |
|---|
| 2079 | 2149 | |
|---|
| 2080 | 2150 | return $rs if ($rs != 0); |
|---|
| … | … | |
| 2093 | 2163 | return $rs if ($rs != 0); |
|---|
| 2094 | 2164 | |
|---|
| | 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 | |
|---|
| 2095 | 2184 | } |
|---|
| 2096 | 2185 | |
|---|
| … | … | |
| 2134 | 2223 | my $starter_dir = $main::cfg{'PHP_STARTER_DIR'}; |
|---|
| 2135 | 2224 | |
|---|
| 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'}; |
|---|
| 2137 | 2227 | |
|---|
| 2138 | 2228 | my $conf_dir = $main::cfg{'CONF_DIR'}; |
|---|
| … | … | |
| 2203 | 2293 | } |
|---|
| 2204 | 2294 | |
|---|
| | 2295 | # Should be created on install! (delete if okay) |
|---|
| 2205 | 2296 | # |
|---|
| 2206 | 2297 | # fastcgi.conf for apache |
|---|
| … | … | |
| 2231 | 2322 | |
|---|
| 2232 | 2323 | # |
|---|
| 2233 | | # php.ini/php5-fcgi-starter for "master" (FCGI-Server) |
|---|
| | 2324 | # php.ini/php-fcgi-starter for "master" (FCGI-Server) |
|---|
| 2234 | 2325 | # |
|---|
| 2235 | | if (!(-e "$starter_dir/master/php.ini")) { |
|---|
| | 2326 | if (!(-e "$starter_dir/master/php5.ini")) { |
|---|
| 2236 | 2327 | |
|---|
| 2237 | 2328 | my $ini_tpl = ''; |
|---|
| 2238 | 2329 | |
|---|
| 2239 | | ($rs, $ini_tpl) = get_file("$conf_dir/php/parts/php.ini"); |
|---|
| | 2330 | ($rs, $ini_tpl) = get_file("$conf_dir/fcgi/parts/php5.ini"); |
|---|
| 2240 | 2331 | |
|---|
| 2241 | 2332 | return $rs if ($rs != 0); |
|---|
| … | … | |
| 2246 | 2337 | |
|---|
| 2247 | 2338 | ($rs, $rdata) = store_file( |
|---|
| 2248 | | "$starter_dir/master/php.ini", |
|---|
| | 2339 | "$starter_dir/master/php5.ini", |
|---|
| 2249 | 2340 | $ini_tpl, |
|---|
| 2250 | 2341 | $sys_user, |
|---|
| … | … | |
| 2255 | 2346 | return $rs if ($rs != 0); |
|---|
| 2256 | 2347 | |
|---|
| | 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 | |
|---|
| 2257 | 2368 | } |
|---|
| 2258 | 2369 | |
|---|
| … | … | |
| 2261 | 2372 | my $starter_tpl = ''; |
|---|
| 2262 | 2373 | |
|---|
| 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"); |
|---|
| 2264 | 2375 | |
|---|
| 2265 | 2376 | return $rs if ($rs != 0); |
|---|
| … | … | |
| 2278 | 2389 | return $rs if ($rs != 0); |
|---|
| 2279 | 2390 | |
|---|
| | 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 | |
|---|
| 2280 | 2410 | } |
|---|
| 2281 | 2411 | |
|---|
| 2282 | 2412 | # |
|---|
| 2283 | | # php.ini for every domain |
|---|
| | 2413 | # php.ini for the domain |
|---|
| 2284 | 2414 | # |
|---|
| 2285 | | if (!(-e "$starter_dir/$dmn_name/php.ini")) { |
|---|
| | 2415 | if (!(-e "$starter_dir/$dmn_name/php5.ini")) { |
|---|
| 2286 | 2416 | |
|---|
| 2287 | 2417 | my $ini_tpl = ''; |
|---|
| 2288 | 2418 | |
|---|
| 2289 | | ($rs, $ini_tpl) = get_file("$conf_dir/php/parts/php.ini"); |
|---|
| | 2419 | ($rs, $ini_tpl) = get_file("$conf_dir/fcgi/parts/php5.ini"); |
|---|
| 2290 | 2420 | |
|---|
| 2291 | 2421 | return $rs if ($rs != 0); |
|---|
| … | … | |
| 2296 | 2426 | |
|---|
| 2297 | 2427 | ($rs, $rdata) = store_file( |
|---|
| 2298 | | "$starter_dir/$dmn_name/php.ini", |
|---|
| | 2428 | "$starter_dir/$dmn_name/php5.ini", |
|---|
| 2299 | 2429 | $ini_tpl, |
|---|
| 2300 | 2430 | $sys_user, |
|---|
| 2301 | 2431 | $sys_group, |
|---|
| 2302 | | 0660 |
|---|
| | 2432 | 0640 |
|---|
| 2303 | 2433 | ); |
|---|
| 2304 | 2434 | |
|---|
| 2305 | 2435 | return $rs if ($rs != 0); |
|---|
| 2306 | 2436 | |
|---|
| | 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); |
|---|
| 2307 | 2456 | } |
|---|
| 2308 | 2457 | |
|---|
| … | … | |
| 2314 | 2463 | my $starter_tpl = ''; |
|---|
| 2315 | 2464 | |
|---|
| 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"); |
|---|
| 2317 | 2466 | |
|---|
| 2318 | 2467 | return $rs if ($rs != 0); |
|---|
| … | … | |
| 2323 | 2472 | ($rs, $rdata) = store_file( |
|---|
| 2324 | 2473 | "$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", |
|---|
| 2325 | 2493 | $starter_tpl, |
|---|
| 2326 | 2494 | $sys_user, |
|---|
| … | … | |
| 3497 | 3665 | my $rs = undef; |
|---|
| 3498 | 3666 | |
|---|
| | 3667 | my $awstats_dir = $main::cfg{'AWSTATS_DIR'}; |
|---|
| | 3668 | |
|---|
| 3499 | 3669 | push_el(\@main::el, 'dmn_add_data()', 'Starting...'); |
|---|
| 3500 | 3670 | |
|---|
| … | … | |
| 3519 | 3689 | return $rs if ($rs != 0); |
|---|
| 3520 | 3690 | |
|---|
| 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 | } |
|---|
| 3525 | 3697 | |
|---|
| 3526 | 3698 | # $rs = dmn_add_crontab_data($dmn_data); |
|---|
| … | … | |
| 3567 | 3739 | return $rs if ($rs != 0); |
|---|
| 3568 | 3740 | |
|---|
| 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 | } |
|---|
| 3573 | 3747 | |
|---|
| 3574 | 3748 | push_el(\@main::el, 'dmn_change_data()', 'Ending...'); |
|---|
| … | … | |
| 3611 | 3785 | return $rs if ($rs != 0); |
|---|
| 3612 | 3786 | |
|---|
| 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 | } |
|---|
| 3617 | 3793 | |
|---|
| 3618 | 3794 | # $rs = dmn_del_crontab_data($dmn_data); |
|---|
|