Aller au contenu
Infogérance Linux Debian en France

Infogérance Linux Debian en France

Kogitae : Ingéniérie de l'hébergement Internet

  • Accueil
  • Parcours
  • Presse
  • Portfolio
  • Blog

Run PHP with a light weight webserver | box.matto.nl

  • Accueil » Blog » Run PHP with a light weight webserver | box.matto.nl
DansDebian, Hebergement, Lighttpd

Run PHP with a light weight webserver | box.matto.nl

Multiple light-weight httpd server

In search for a lightweight solution to run some php pages on my Debian diskless shellserver it appears there are several lightweight httpd daemons in Debian that can do php.

I created some virtual machines on KVM to do some testing. Here follows a short howto to get the different httpd servers running 🙂

Howto install lightweigt httpd daemons with PHP support

Debian comes with several httpd daemons. On this page we look at the following httpd servers:

Lighthttpd

Cherokee

Nginx

Nginx requires the most work.

Lighthttpd with PHP

apt-get install mysql-server mysql-client

apt-get install lighttpd

comment this line out in /etc/lighttpd/lighttpd.conf include_shell « /usr/share/lighttpd/use-ipv6.pl »

check that lighthttpd is running.

Point your browser to http://<ip-number>

screenshot of lighttpd

Screenshot of lighttpd just after installing

apt-get install php5-cgi

ln -s /etc/lighttpd/conf-available/10-fastcgi.conf /etc/lighttpd/conf-enabled/

/etc/init.d/lighttpd restart

PHP ready to use

Your server should be ready to use PHP now. To test it, create a file info.php in /var/www. The contents of the file should be something like this:

<?

phpinfo();

?>

screenshot of lighttpd running php info

Screenshot of lighttpd running phpinfo

Cherokee with PHP

apt-get install mysql-server mysql-client

apt-get install cherokee

apt-get install php5-cgi

test that cherokee runs, point your browser to http://<ip-number>

screenshot of cherokee

Screenshot of cherokee just after installing

Run cherokee-admin -b

The -b option makes it possible to reach cherokee-admin from other machines than localhost.

screenshot of cherokee admin

Screenshot of cherokee admin

Click on Virtual servers

Click on « default »

Click on « Wizzards »

Click on « Languages »

Click on « Run Wizzard » next to the PHP logo

(See screenshot below)

screenshot of cherokee admin ready to invoke php wizzard

Screenshot of cherokee admin ready to invoke the PHP-wizzard

PHP ready to use

Your server should be ready to use PHP now. To test it, create a file info.php in /var/www. The contents of the file should be something like this:

<?

phpinfo();

?>

screenshot of cherokee running php info

Screenshot of cherokee running phpinfo

viaRun PHP with a light weight webserver | box.matto.nl.

cheerokee cherokee-screenshot-server lightweight-php-mysql-server lightweight-php-web-server lightweight-web-server-debian linux-light-weight-php-mysql linux-lightweight-httpd-php linux-lightweight-php-server llighttpd php5-cgi-weight run-eclipse-php-with-lighttpd webserver-php-mysql-lightweight

Étiquettes

administrateur-systeme-freelance (9) amazon (3) apache (14) asterisk (9) auth (3) bash (6) blog-administrateur-systeme (14) blog-administration-systeme (4) collectd (5) cpu (3) debian (30) dovecot (4) duplicate (3) f (6) freelance-asterisk (3) google (3) infogerance-linux (5) infogérance (4) ipv6 (7) kernel (4) kogitae (30) kogitae-com (3) kogitae-fr (6) lamp-or-linux-or-developpement-web-and-apache-or-php-or-mysql-or-adobe-or-eclipse-or-zend-or-mozilla-or-firefox (17) lenny (4) lighttpd (5) limit (4) linux (26) mail (7) mdadm (6) mysql (14) openvz (9) optimiser (4) php (5) postfix (11) privvmpages-openvz (3) pxe (3) raid (3) SEO (5) ssh (8) ssl (3) test (3) voip (4) wordpress (6) www-kogitae-fr (7)