Commit ff1d9a79 authored by wyrie's avatar wyrie
Browse files

Installer: Gentoo updates

• Added configure_dovecot function
• Updated functions configure_postfix, configure_pureftpd, configure_apache, install_ispconfig, configure_apps_vhost
• Bug fix in configure_amavis where installer was not including the ispconfig config file
• Bug fix in configure_apache where in suphp.conf the php handler line would be duplicated through updates
• replace double-quoted strings with single-quoted whenever appropriate
• changed inline comments to coding standards
• fixed OS specific paths
• changes to installer_base 1) add_database_server_record added os specific override of awstats paths 2) find_installed_apps courier not detecting correctly for gentoo
parent 9539ceb4
......@@ -88,8 +88,8 @@ $conf['apache']['vhost_conf_dir'] = $conf['apache']['config_dir'] . '/vhosts.d';
$conf['apache']['vhost_conf_enabled_dir'] = $conf['apache']['vhost_conf_dir'];
$conf['apache']['vhost_default'] = '00_default_vhost.conf';
$conf['apache']['vhost_port'] = '8080';
$conf['apache']['php_ini_path_apache'] = '/etc/php5/apache2/php.ini';
$conf['apache']['php_ini_path_cgi'] = '/etc/php5/cgi/php.ini';
$conf['apache']['php_ini_path_apache'] = '/etc/php/apache2-php5/php.ini';
$conf['apache']['php_ini_path_cgi'] = '/etc/php/cgi-php5/php.ini';
//* Website base settings
$conf['web']['website_basedir'] = '/var/www';
......@@ -103,24 +103,14 @@ $conf['web']['apps_vhost_servername'] = '';
$conf['web']['apps_vhost_user'] = 'ispapps';
$conf['web']['apps_vhost_group'] = 'ispapps';
//* Fastcgi
$conf['fastcgi']['fastcgi_phpini_path'] = '/etc/php/cgi-php5';
//TODO do fastcgi setup
$conf['fastcgi']['fastcgi_starter_path'] = '/var/www/php-fcgi-scripts/[system_user]/';
//* Website base settings
$conf['web']['website_basedir'] = '/var/www';
$conf['web']['website_path'] = '/var/www/clients/client[client_id]/web[website_id]';
$conf['web']['website_symlinks'] = '/var/www/[website_domain]/:/var/www/clients/client[client_id]/[website_domain]/';
//* Apps base settings
$conf['web']['apps_vhost_ip'] = '_default_';
$conf['web']['apps_vhost_port'] = '8081';
$conf['web']['apps_vhost_servername'] = '';
$conf['web']['apps_vhost_user'] = 'ispapps';
$conf['web']['apps_vhost_group'] = 'ispapps';
//* Awstats settings
$conf['awstats']['conf_dir'] = '/etc/awstats';
$conf['awstats']['data_dir'] = '/var/lib/awstats';
$conf['awstats']['pl'] = '/usr/bin/awstats.pl';
$conf['awstats']['buildstaticpages_pl'] = '/usr/bin/awstats_buildstaticpages.pl';
//* Fastcgi
$conf['fastcgi']['fastcgi_phpini_path'] = '/etc/php5/cgi/';
$conf['fastcgi']['fastcgi_phpini_path'] = '/etc/php/cgi-php5';
$conf['fastcgi']['fastcgi_starter_path'] = '/var/www/php-fcgi-scripts/[system_user]/';
//* Postfix
......@@ -191,7 +181,7 @@ $conf['powerdns']['init_script'] = 'pdns.local';
//* BIND DNS Server
$conf['bind']['installed'] = false; // will be detected automatically during installation
$conf['bind']['bind_user'] = 'root';
$conf['bind']['bind_group'] = 'bind';
$conf['bind']['bind_group'] = 'named';
$conf['bind']['bind_zonefiles_dir'] = '/etc/bind';
$conf['bind']['named_conf_path'] = '/etc/bind/named.conf';
$conf['bind']['named_conf_local_path'] = '/etc/bind/named.conf.local';
......
This diff is collapsed.
######################################################
# This virtual host contains the configuration
# for the ISPConfig apps vhost
######################################################
{vhost_port_listen} Listen {apps_vhost_port}
# NameVirtualHost *:{apps_vhost_port}
<VirtualHost {apps_vhost_ip}:{apps_vhost_port}>
ServerAdmin webmaster@localhost
{apps_vhost_servername}
<IfModule mod_fcgid.c>
DocumentRoot {apps_vhost_dir}
SuexecUserGroup ispapps ispapps
<Directory {apps_vhost_dir}>
Options Indexes FollowSymLinks MultiViews +ExecCGI
AllowOverride AuthConfig Indexes Limit Options FileInfo
<FilesMatch "\.ph(p[3-5]?|tml)$">
SetHandler fcgid-script
</FilesMatch>
FCGIWrapper {website_basedir}/php-fcgi-scripts/apps/.php-fcgi-starter .php
Order allow,deny
Allow from all
</Directory>
DirectoryIndex index.php
</IfModule>
<IfModule mod_php5.c>
DocumentRoot {apps_vhost_dir}
AddType application/x-httpd-php .php
<Directory {apps_vhost_dir}>
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</IfModule>
ServerSignature Off
</VirtualHost>
#!/bin/sh
PHPRC=/etc/php/cgi-php5/
export PHPRC
export PHP_FCGI_MAX_REQUESTS=5000
export PHP_FCGI_CHILDREN=1
exec /usr/bin/php-cgi -d magic_quotes_gpc=off
\ No newline at end of file
######################################################
# This virtual host contains the configuration
# for the ISPConfig controlpanel
######################################################
{vhost_port_listen} Listen {vhost_port}
NameVirtualHost *:{vhost_port}
<VirtualHost _default_:{vhost_port}>
ServerAdmin webmaster@localhost
<IfModule mod_fcgid.c>
DocumentRoot /var/www/ispconfig/
SuexecUserGroup ispconfig ispconfig
<Directory /var/www/ispconfig/>
Options Indexes FollowSymLinks MultiViews +ExecCGI
AllowOverride AuthConfig Indexes Limit Options FileInfo
<FilesMatch "\.ph(p[3-5]?|tml)$">
SetHandler fcgid-script
</FilesMatch>
FCGIWrapper /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter .php
Order allow,deny
Allow from all
</Directory>
DirectoryIndex index.php
</IfModule>
<IfModule mod_php5.c>
DocumentRoot /usr/local/ispconfig/interface/web/
AddType application/x-httpd-php .php
<Directory /usr/local/ispconfig/interface/web>
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
php_value magic_quotes_gpc 0
</Directory>
</IfModule>
# ErrorLog /var/log/apache2/error.log
# CustomLog /var/log/apache2/access.log combined
ServerSignature Off
<IfModule mod_security2.c>
SecRuleEngine Off
</IfModule>
# SSL Configuration
{ssl_comment}SSLEngine On
{ssl_comment}SSLCertificateFile /usr/local/ispconfig/interface/ssl/ispserver.crt
{ssl_comment}SSLCertificateKeyFile /usr/local/ispconfig/interface/ssl/ispserver.key
</VirtualHost>
<Directory /var/www/php-cgi-scripts>
AllowOverride None
Order Deny,Allow
Deny from all
</Directory>
<Directory /var/www/php-fcgi-scripts>
AllowOverride None
Order Deny,Allow
Deny from all
</Directory>
#!/bin/sh
PHPRC=/etc/php/cgi-php5/
export PHPRC
export PHP_FCGI_MAX_REQUESTS=5000
export PHP_FCGI_CHILDREN=1
exec /usr/bin/php-cgi -d magic_quotes_gpc=off -d session.save_path=/usr/local/ispconfig/server/temp
\ No newline at end of file
protocols = imap imaps pop3 pop3s
disable_plaintext_auth = no
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_privileged_group = mail
ssl_cert_file = /etc/ssl/dovecot/server.crt
ssl_key_file = /etc/ssl/dovecot/server.key
##
## IMAP specific settings
##
protocol imap {
login_executable = /usr/libexec/dovecot/imap-login
mail_executable = /usr/libexec/dovecot/imap
mail_plugins = quota imap_quota
mail_plugin_dir = /usr/lib/dovecot/imap
}
##
## POP3 specific settings
##
protocol pop3 {
login_executable = /usr/libexec/dovecot/pop3-login
mail_executable = /usr/libexec/dovecot/pop3
pop3_uidl_format = %08Xu%08Xv
mail_plugins = quota
mail_plugin_dir = /usr/lib/dovecot/pop3
}
##
## LDA specific settings
##
protocol lda {
postmaster_address = postmaster@example.com
mail_plugin_dir = /usr/lib/dovecot/lda
auth_socket_path = /var/run/dovecot/auth-master
mail_plugins = sieve quota
}
## Plugin settings
plugin {
quota = maildir
sieve=/var/vmail/%d/%n/.sieve
}
##
## Authentication processes
##
auth default {
mechanisms = plain login
passdb pam {
args = "*"
}
# SQL database <doc/wiki/AuthDatabase.SQL.txt>
passdb sql {
# Path for SQL configuration file
args = /etc/dovecot/dovecot-sql.conf
}
# new quota support:
userdb prefetch {
}
userdb sql {
args = /etc/dovecot/dovecot-sql.conf
}
## dovecot-lda specific settings
##
socket listen {
master {
path = /var/run/dovecot/auth-master
mode = 0600
user = vmail # User running Dovecot LDA
#group = vmail # Or alternatively mode 0660 + LDA user in this group
}
client {
path = /var/spool/postfix/private/auth
mode = 0660
user = postfix
group = postfix
}
}
}
mail_location = maildir:/var/vmail/%d/%n/Maildir
mail_uid = 5000
mail_gid = 5000
......@@ -115,7 +115,7 @@ class installer_base {
if(is_installed('postfix')) $conf['postfix']['installed'] = true;
if(is_installed('apache') || is_installed('apache2') || is_installed('httpd')) $conf['apache']['installed'] = true;
if(is_installed('getmail')) $conf['getmail']['installed'] = true;
if(is_installed('couriertcpd')) $conf['courier']['installed'] = true;
if(is_installed('courierlogger')) $conf['courier']['installed'] = true;
if(is_installed('dovecot')) $conf['dovecot']['installed'] = true;
if(is_installed('saslsauthd')) $conf['saslauthd']['installed'] = true;
if(is_installed('amavisd-new')) $conf['amavis']['installed'] = true;
......@@ -221,6 +221,12 @@ class installer_base {
$tpl_ini_array['dns']['bind_zonefiles_dir'] = $conf['bind']['bind_zonefiles_dir'];
$tpl_ini_array['dns']['named_conf_path'] = $conf['bind']['named_conf_path'];
$tpl_ini_array['dns']['named_conf_local_path'] = $conf['bind']['named_conf_local_path'];
if (array_key_exists('awstats', $conf)) {
foreach ($conf['awstats'] as $aw_sett => $aw_value) {
$tpl_ini_array['web']['awstats_'.$aw_sett] = $aw_value;
}
}
$server_ini_content = array_to_ini($tpl_ini_array);
$server_ini_content = mysql_real_escape_string($server_ini_content);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment