Remember you either use Apache OR lighttpd, but don’t run both, they do the same job, interpret PHP script mainly.
Install the webserver
1 2 3 |
sudo apt-get install lighttpd |
1 2 3 |
sudo apt-get install php5-cgi |
We need cgi to run the php code.
Part of the install is to start the service as well so check that its running.
1 2 3 |
ps -u www-data u |
IT should look like the following
1 2 3 4 |
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND www-data 6499 0.0 0.2 6604 1132 ? S 23:29 0:00 /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf |
If you see the above output then its all up and running,
To test it it, visit in your browser, the following address
http://192.168.0.27/phpinfo.php
Problems with port 80?, is Apache using that port?
One way is to get everything you might need!
1 2 3 |
sudo apt-get install php5-cgi php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-mhash php5-ming php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl php5-fpm php5-cgi php5-cli php5-common php5-suhosin |