tbrehm
2008-09-21 871b338ce958111fb8fdea43c30beeaa0fb82322
- Updated ubuntu installation instructions.
- Fixed a few bugs in suphp implementation.
7 files modified
113 ■■■■ changed files
INSTALL_UBUNTU_8.04.txt 30 ●●●● patch | view | raw | blame | history
install/lib/installer_base.lib.php 5 ●●●●● patch | view | raw | blame | history
install/tpl/apache_ispconfig.vhost.master 38 ●●●●● patch | view | raw | blame | history
interface/web/admin/lib/lang/en.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/admin/lib/module.conf.php 20 ●●●●● patch | view | raw | blame | history
server/conf/vhost.conf.master 17 ●●●●● patch | view | raw | blame | history
server/plugins-available/apache2_plugin.inc.php 1 ●●●● patch | view | raw | blame | history
INSTALL_UBUNTU_8.04.txt
@@ -17,10 +17,11 @@
1) Install Postfix, Courier, Saslauthd, MySQL, phpMyAdmin with the following command line (on one line!):
apt-get install postfix postfix-mysql postfix-doc mysql-client mysql-server courier-authdaemon courier-authlib-mysql courier-pop courier-pop-ssl courier-imap courier-imap-ssl postfix-tls libsasl2-2 libsasl2-modules libsasl2-modules-sql sasl2-bin libpam-mysql openssl courier-maildrop getmail4
apt-get install postfix postfix-mysql postfix-doc mysql-client mysql-server courier-authdaemon courier-authlib-mysql courier-pop courier-pop-ssl courier-imap courier-imap-ssl libsasl2-2 libsasl2-modules libsasl2-modules-sql sasl2-bin libpam-mysql openssl courier-maildrop getmail4
Answer the questions from the package manager as follows.
Enter the mysql root password.
Create directories for web-based administration ? <-- No
General type of configuration? <-- Internet site
Mail name? <-- server1.mydomain.tld
@@ -43,6 +44,25 @@
a2enmod rewrite
a2enmod ssl
Optional: Install SuPHP
apt-get install libapache2-mod-suphp
vi /etc/suphp/suphp.conf
set docroot to:
docroot=/var/clients
Change:
application/x-httpd-php=php:/usr/bin/php-cgi
to:
x-httpd-php=php:/usr/bin/php-cgi
4) Install pure-ftpd and quota
First we have to make sure that the capability module is loaded in the kernel
@@ -61,9 +81,9 @@
apt-get install g++ libc6 gcc gawk make texinfo libmysqlclient15-dev
cd /tmp
wget http://mydns.bboy.net/download/mydns-1.1.0.tar.gz
tar xvfz mydns-1.1.0.tar.gz
cd mydns-1.1.0
wget http://heanet.dl.sourceforge.net/sourceforge/mydns-ng/mydns-1.2.8.4.tar.gz
tar xvfz mydns-1.2.8.4.tar.gz
cd mydns-1.2.8
./configure
make
make install
@@ -87,7 +107,7 @@
set -e
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/mydns
DAEMON=/usr/local/sbin/mydns
NAME=mydns
DESC="DNS server"
install/lib/installer_base.lib.php
@@ -610,6 +610,11 @@
        //* Create the logging directory for the vhost logfiles
        exec('mkdir -p /var/log/ispconfig/httpd');
        
        if(is_file('/etc/suphp/suphp.conf')) {
            replaceLine('/etc/suphp/suphp.conf','application/x-httpd-php=php:/usr/bin/php-cgi','x-httpd-suphp=php:/usr/bin/php-cgi',0);
            replaceLine('/etc/suphp/suphp.conf','docroot=','docroot=/var/clients',0);
        }
    }
    
    public function configure_firewall()
install/tpl/apache_ispconfig.vhost.master
@@ -12,33 +12,27 @@
    DocumentRoot /usr/local/ispconfig/interface/web/
    
    <IfModule mod_fastcgi.c>
        <Location /php/php-fcgi>
                    Options ExecCGI
                    SetHandler fastcgi-script
               </Location>
            Action php-fastcgi /php/php-fcgi
        ScriptAlias /php/ /usr/local/ispconfig/interface/bin/
        <Directory "/usr/local/ispconfig/interface/bin/">
                        AllowOverride None
                        Options +ExecCGI -MultiViews -Indexes
                        Order allow,deny
                        Allow from all
            </Directory>
        SuexecUserGroup ispconfig ispconfig
        <Directory /var/www/ispconfig/>
                Options Indexes FollowSymLinks MultiViews +ExecCGI
                AllowOverride AuthConfig Indexes Limit Options FileInfo
                AddHandler fcgid-script .php
                FCGIWrapper /var/www/php-fcgi-scripts/ispconfig/php-fcgi-starter .php
                AllowOverride None
                Order allow,deny
                Allow from all
        </Directory>
    </IfModule>
    <IfModule mod_php5.c>
          AddType application/x-httpd-php .php
        <Directory /usr/local/ispconfig/interface/web>
            Options FollowSymLinks
            AllowOverride None
            Order allow,deny
            Allow from all
        </Directory>
    </IfModule>
    <Directory /usr/local/ispconfig/interface/web/>
        Options FollowSymLinks
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>
    
    # ErrorLog /var/log/apache2/error.log
    # CustomLog /var/log/apache2/access.log combined
interface/web/admin/lib/lang/en.lng
@@ -31,5 +31,7 @@
$wb['Export'] = 'Export';
$wb['Import'] = 'Import';
$wb['Language Editor'] = 'Language Editor';
$wb['Software'] = 'Software';
$wb['Repositories'] = 'Repositories';
?>
interface/web/admin/lib/module.conf.php
@@ -85,6 +85,25 @@
// cleanup
unset($items);
$items[] = array( 'title'     => 'Repositories',
                  'target'     => 'content',
                  'link'    => 'admin/software_repo_list.php');
$module['nav'][] = array(    'title'    => 'Software',
                            'open'     => 1,
                            'items'    => $items);
// cleanup
unset($items);
/*
$items[] = array( 'title'     => 'Add user',
                  'target'     => 'content',
                  'link'    => 'admin/dbsync_edit.php');
@@ -105,6 +124,7 @@
// cleanup
unset($items);
*/
server/conf/vhost.conf.master
@@ -1,6 +1,11 @@
<VirtualHost <tmpl_var name='ip_address'>:80>
    DocumentRoot <tmpl_var name='web_document_root'>
    <tmpl_if name='php' op='==' value='suphp'>
    DocumentRoot <tmpl_var name='web_document_root'>
    </tmpl_else>
    DocumentRoot <tmpl_var name='web_document_root_www'>
    </tmpl_if>
    ServerName <tmpl_var name='domain'>
    ServerAdmin webmaster@<tmpl_var name='domain'>
    ErrorLog <tmpl_var name='document_root'>/log/error.log
@@ -13,7 +18,7 @@
    ErrorDocument 500 /error/internalServerError.html
    ErrorDocument 503 /error/overloaded.html
    
    <Directory <tmpl_var name='web_document_root'>/>
    <Directory {tmpl_var name='web_document_root_www'}>
        Options None
        AllowOverride Indexes AuthConfig Limit FileInfo
        Order allow,deny
@@ -43,12 +48,12 @@
    AddType application/x-httpd-php .php .php3 .php4 .php5
</tmpl_if>
<tmpl_if name='php' op='==' value='suphp'>
    <Directory <tmpl_var name='web_document_root'>/>
    <Directory {tmpl_var name='web_document_root'}>
    # suphp enabled
    suPHP_Engine on
    # suPHP_UserGroup <tmpl_var name='system_user'> <tmpl_var name='system_group'>
    AddHandler x-httpd-php .php .php3 .php4 .php5
    suPHP_AddHandler x-httpd-php
    AddHandler x-httpd-suphp .php .php3 .php4 .php5
    suPHP_AddHandler x-httpd-suphp
    </Directory>
</tmpl_if>
<tmpl_if name='php' op='==' value='cgi'>
@@ -57,7 +62,7 @@
</tmpl_if>
<tmpl_if name='php' op='==' value='fast-cgi'>
     # php as fast-cgi enabled
    <Directory /var/www/<tmpl_var name='domain'>/web>
    <Directory {tmpl_var name='web_document_root_www'}>
        AddHandler fcgid-script .php .php3 .php4 .php5
        FCGIWrapper <tmpl_var name='fastcgi_starter_path'><tmpl_var name='fastcgi_starter_script'> .php
        Options FollowSymLinks +ExecCGI Indexes
server/plugins-available/apache2_plugin.inc.php
@@ -337,6 +337,7 @@
        
        $vhost_data = $data["new"];
        $vhost_data["web_document_root"] = $data["new"]["document_root"]."/web";
        $vhost_data["web_document_root_www"] = "/var/www/".$data["new"]["domain"]."/web";
        
        // Check if a SSL cert exists
        $ssl_dir = $data["new"]["document_root"]."/ssl";