Skip to content

Commit 871b338

Browse files
committed
- Updated ubuntu installation instructions.
- Fixed a few bugs in suphp implementation.
1 parent 326a8db commit 871b338

File tree

7 files changed

+80
-33
lines changed

7 files changed

+80
-33
lines changed

INSTALL_UBUNTU_8.04.txt

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@ apt-get -u upgrade
1717

1818
1) Install Postfix, Courier, Saslauthd, MySQL, phpMyAdmin with the following command line (on one line!):
1919

20-
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
20+
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
2121

2222
Answer the questions from the package manager as follows.
2323

24+
Enter the mysql root password.
2425
Create directories for web-based administration ? <-- No
2526
General type of configuration? <-- Internet site
2627
Mail name? <-- server1.mydomain.tld
@@ -43,6 +44,25 @@ a2enmod suexec
4344
a2enmod rewrite
4445
a2enmod ssl
4546

47+
Optional: Install SuPHP
48+
49+
apt-get install libapache2-mod-suphp
50+
51+
vi /etc/suphp/suphp.conf
52+
53+
set docroot to:
54+
55+
docroot=/var/clients
56+
57+
Change:
58+
59+
application/x-httpd-php=php:/usr/bin/php-cgi
60+
61+
to:
62+
63+
x-httpd-php=php:/usr/bin/php-cgi
64+
65+
4666
4) Install pure-ftpd and quota
4767

4868
First we have to make sure that the capability module is loaded in the kernel
@@ -61,9 +81,9 @@ echo 'yes' > /etc/pure-ftpd/conf/DontResolve
6181
apt-get install g++ libc6 gcc gawk make texinfo libmysqlclient15-dev
6282

6383
cd /tmp
64-
wget http://mydns.bboy.net/download/mydns-1.1.0.tar.gz
65-
tar xvfz mydns-1.1.0.tar.gz
66-
cd mydns-1.1.0
84+
wget http://heanet.dl.sourceforge.net/sourceforge/mydns-ng/mydns-1.2.8.4.tar.gz
85+
tar xvfz mydns-1.2.8.4.tar.gz
86+
cd mydns-1.2.8
6787
./configure
6888
make
6989
make install
@@ -87,7 +107,7 @@ and enter the following lines (between the ----- lines):
87107
set -e
88108

89109
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
90-
DAEMON=/usr/sbin/mydns
110+
DAEMON=/usr/local/sbin/mydns
91111
NAME=mydns
92112
DESC="DNS server"
93113

install/lib/installer_base.lib.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,11 @@ public function configure_apache()
610610
//* Create the logging directory for the vhost logfiles
611611
exec('mkdir -p /var/log/ispconfig/httpd');
612612

613+
if(is_file('/etc/suphp/suphp.conf')) {
614+
replaceLine('/etc/suphp/suphp.conf','application/x-httpd-php=php:/usr/bin/php-cgi','x-httpd-suphp=php:/usr/bin/php-cgi',0);
615+
replaceLine('/etc/suphp/suphp.conf','docroot=','docroot=/var/clients',0);
616+
}
617+
613618
}
614619

615620
public function configure_firewall()

install/tpl/apache_ispconfig.vhost.master

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,34 +12,28 @@ NameVirtualHost *:{vhost_port}
1212
DocumentRoot /usr/local/ispconfig/interface/web/
1313

1414
<IfModule mod_fastcgi.c>
15-
<Location /php/php-fcgi>
16-
Options ExecCGI
17-
SetHandler fastcgi-script
18-
</Location>
19-
20-
Action php-fastcgi /php/php-fcgi
21-
22-
ScriptAlias /php/ /usr/local/ispconfig/interface/bin/
23-
24-
<Directory "/usr/local/ispconfig/interface/bin/">
25-
AllowOverride None
26-
Options +ExecCGI -MultiViews -Indexes
27-
Order allow,deny
28-
Allow from all
29-
</Directory>
15+
SuexecUserGroup ispconfig ispconfig
16+
<Directory /var/www/ispconfig/>
17+
Options Indexes FollowSymLinks MultiViews +ExecCGI
18+
AllowOverride AuthConfig Indexes Limit Options FileInfo
19+
AddHandler fcgid-script .php
20+
FCGIWrapper /var/www/php-fcgi-scripts/ispconfig/php-fcgi-starter .php
21+
AllowOverride None
22+
Order allow,deny
23+
Allow from all
24+
</Directory>
3025
</IfModule>
3126

3227
<IfModule mod_php5.c>
3328
AddType application/x-httpd-php .php
29+
<Directory /usr/local/ispconfig/interface/web>
30+
Options FollowSymLinks
31+
AllowOverride None
32+
Order allow,deny
33+
Allow from all
34+
</Directory>
3435
</IfModule>
3536

36-
<Directory /usr/local/ispconfig/interface/web/>
37-
Options FollowSymLinks
38-
AllowOverride None
39-
Order allow,deny
40-
Allow from all
41-
</Directory>
42-
4337
# ErrorLog /var/log/apache2/error.log
4438
# CustomLog /var/log/apache2/access.log combined
4539
ServerSignature Off

interface/web/admin/lib/lang/en.lng

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,7 @@ $wb['New Language'] = 'New Language';
3131
$wb['Export'] = 'Export';
3232
$wb['Import'] = 'Import';
3333
$wb['Language Editor'] = 'Language Editor';
34+
$wb['Software'] = 'Software';
35+
$wb['Repositories'] = 'Repositories';
3436

3537
?>

interface/web/admin/lib/module.conf.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,25 @@
8585
// cleanup
8686
unset($items);
8787

88+
89+
$items[] = array( 'title' => 'Repositories',
90+
'target' => 'content',
91+
'link' => 'admin/software_repo_list.php');
92+
93+
94+
95+
$module['nav'][] = array( 'title' => 'Software',
96+
'open' => 1,
97+
'items' => $items);
98+
99+
100+
// cleanup
101+
unset($items);
102+
103+
104+
105+
106+
/*
88107
$items[] = array( 'title' => 'Add user',
89108
'target' => 'content',
90109
'link' => 'admin/dbsync_edit.php');
@@ -105,6 +124,7 @@
105124
106125
// cleanup
107126
unset($items);
127+
*/
108128

109129

110130

server/conf/vhost.conf.master

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11

22
<VirtualHost <tmpl_var name='ip_address'>:80>
3-
DocumentRoot <tmpl_var name='web_document_root'>
3+
<tmpl_if name='php' op='==' value='suphp'>
4+
DocumentRoot <tmpl_var name='web_document_root'>
5+
</tmpl_else>
6+
DocumentRoot <tmpl_var name='web_document_root_www'>
7+
</tmpl_if>
8+
49
ServerName <tmpl_var name='domain'>
510
ServerAdmin webmaster@<tmpl_var name='domain'>
611
ErrorLog <tmpl_var name='document_root'>/log/error.log
@@ -13,7 +18,7 @@
1318
ErrorDocument 500 /error/internalServerError.html
1419
ErrorDocument 503 /error/overloaded.html
1520

16-
<Directory <tmpl_var name='web_document_root'>/>
21+
<Directory {tmpl_var name='web_document_root_www'}>
1722
Options None
1823
AllowOverride Indexes AuthConfig Limit FileInfo
1924
Order allow,deny
@@ -43,12 +48,12 @@
4348
AddType application/x-httpd-php .php .php3 .php4 .php5
4449
</tmpl_if>
4550
<tmpl_if name='php' op='==' value='suphp'>
46-
<Directory <tmpl_var name='web_document_root'>/>
51+
<Directory {tmpl_var name='web_document_root'}>
4752
# suphp enabled
4853
suPHP_Engine on
4954
# suPHP_UserGroup <tmpl_var name='system_user'> <tmpl_var name='system_group'>
50-
AddHandler x-httpd-php .php .php3 .php4 .php5
51-
suPHP_AddHandler x-httpd-php
55+
AddHandler x-httpd-suphp .php .php3 .php4 .php5
56+
suPHP_AddHandler x-httpd-suphp
5257
</Directory>
5358
</tmpl_if>
5459
<tmpl_if name='php' op='==' value='cgi'>
@@ -57,7 +62,7 @@
5762
</tmpl_if>
5863
<tmpl_if name='php' op='==' value='fast-cgi'>
5964
# php as fast-cgi enabled
60-
<Directory /var/www/<tmpl_var name='domain'>/web>
65+
<Directory {tmpl_var name='web_document_root_www'}>
6166
AddHandler fcgid-script .php .php3 .php4 .php5
6267
FCGIWrapper <tmpl_var name='fastcgi_starter_path'><tmpl_var name='fastcgi_starter_script'> .php
6368
Options FollowSymLinks +ExecCGI Indexes

server/plugins-available/apache2_plugin.inc.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,7 @@ function update($event_name,$data) {
337337

338338
$vhost_data = $data["new"];
339339
$vhost_data["web_document_root"] = $data["new"]["document_root"]."/web";
340+
$vhost_data["web_document_root_www"] = "/var/www/".$data["new"]["domain"]."/web";
340341

341342
// Check if a SSL cert exists
342343
$ssl_dir = $data["new"]["document_root"]."/ssl";

0 commit comments

Comments
 (0)