The Perfect Setup - Ubuntu 6.06 LTS Server (Dapper Drake) - Page 6
On this page
13 Apache/PHP5
Now we install Apache:
apt-get install apache2 apache2-common apache2-doc apache2-mpm-prefork apache2-utils libapr0 libexpat1 ssl-cert
Next we install PHP5:
apt-get install autoconf automake1.4 autotools-dev libapache2-mod-php5 php5 php5-common php5-curl php5-dev php5-gd php-pear php5-ldap php5-mhash php5-mysql php5-mysqli php5-snmp php5-sqlite php5-xmlrpc php5-xsl php5-imap php5-mcrypt php5-pspell
You will be asked the following question:
Continue installing libc-client without Maildir support? <-- Yes
Next we edit /etc/apache2/apache2.conf
vi /etc/apache2/apache2.conf
and change DirectoryIndex to
[...] |
Edit /etc/apache2/ports.conf and add Listen 443:
vi /etc/apache2/ports.conf
Listen 80 |
Now we have to enable some Apache modules (SSL, rewrite, suexec, and include):
a2enmod ssl
a2enmod rewrite
a2enmod suexec
a2enmod include
Reload the Apache configuration:
/etc/init.d/apache2 force-reload
13.1 Disable PHP Globally
(If you do not plan to install ISPConfig on this server, please skip this section!)
In ISPConfig you will configure PHP on a per-website basis, i.e. you can specify which website can run PHP scripts and which one cannot. This can only work if PHP is disabled globally because otherwise all websites would be able to run PHP scripts, no matter what you specify in ISPConfig.
To disable PHP globally, we edit /etc/mime.types and comment out the application/x-httpd-php lines:
vi /etc/mime.types
[...] |
Edit /etc/apache2/mods-enabled/php5.conf and comment out the following lines:
vi /etc/apache2/mods-enabled/php5.conf
<IfModule mod_php5.c> |
Then restart Apache:
/etc/init.d/apache2 restart
14 Proftpd
In order to install Proftpd, run
apt-get install proftpd proftpd-common ucf
You will be asked a question:
Run proftpd from inetd or standalone? <-- standalone
For security reasons you can add the following lines to /etc/proftpd.conf (thanks to Reinaldo Carvalho; more information can be found here: http://proftpd.linux.co.uk/localsite/Userguide/linked/userguide.html):
vi /etc/proftpd.conf
[...] |
Then restart Proftpd:
/etc/init.d/proftpd restart
Sub pages
Suggested articles
5 Comment(s)
Comments
13.1 Disable PHP Globally
I didn't disable PHP globally and ISPConfig ver. 2.2.3 commented out this line.
... btw. great work, thanx for this HOWTO
Tazi
The link to http://proftpd.linux.co.uk/localsite/Userguide/linked/userguide.html no longer works
I think http://www.proftpd.org/localsite/Userguide/linked/userguide.html is the same page.
Following this howto I found that the login to the ftp server was very slow. I fixed it addind the following line to /etc/proftpd.conf:
IdentLookups off
I hope this will be useful to you all.
I found that when i suued the command
apt-get install proftpd proftpd-common ucf
there was a conflict between proftpd and proftpd-common and it would not install. I omitted proftpd-common and just installed proftpd and ucf. I also noticed that it gets installed to
/etc/proftpd/ so the next step to edit the conf file should be
vi /etc/proftpd/proftpd.conf
Great Work. as 6.06 is deemed LTS I plan on sticking with this setup.
WaveQam
Just to add to your ptoftpd comment...
Ubuntu 6.06 LTS identifies itself as "Debian Unstable" to the ISPconfig installer. So while ISPconfig is compatable with Ubuntu, it does not know it is being installed on Ubuntu.
This is a problem because Ubuntu places the proftpd config in /etc/proftpd/prtoftpd.conf while Debian Unstable places it in /etc/proftpd.conf. As a result, proftpd does not work correctly for ISPconfig installs!!!
I discussed this with ISPconfig support. I made a suggestion, but they had a better one. If we execure the following command, we will be linking the config files new location to the old location, making everyone happy, and most importantly, giving your ISPconfig end users the best possible ftp experience.
ln -s /etc/proftpd/proftpd.conf /etc/proftpd.conf
Run this command after you install proftpd.
Thanks go to Ubuntu for their long term support version, LTS is what all admins need to make their life easier. Thanks also go to ISPconfig for their great control panel, making web reselling affordable again. And last, but not least, thanks to Falko for showing us how it all comes together in a perfect way!
George
English |
Deutsch