sudo -i apt-get update apt-get install nginx php5-fpm php5-cgi php5-cli php5-common libfcgi-perl service nginx start ifconfig Test your Pi's IP address in your browser. ---Setting up PHP--- cd /etc/nginx/sites-available/ pico default [... Edit this section, removing the # signs as seen in the video] location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini # # With php5-cgi alone: # # fastcgi_pass; # With php5-fpm: fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; include fastcgi_params; } [...] CTRL-X to save the file. service nginx restart cd /usr/share/nginx/www pico index.php [ Start Copy & Paste ] Hello World in PHP [ End Copy & Paste ] CTRL-X to save the file. Test in your web browser using your IP address /index.php as seen in the video. --- Setting Up Perl (Optional) --- cd /etc/nginx/sites-available pico default Add the following under the PHP section as seen in the video. [...] location ~ \.pl|cgi$ { try_files $uri =404; gzip off; fastcgi_pass; fastcgi_index; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } [...] CTRL-X to save. FastCGI Wrapper Scripts wget -O /usr/bin/ wget -O /etc/init.d/perl-fcgi chmod +x /usr/bin/ chmod +x /etc/init.d/perl-fcgi update-rc.d perl-fcgi defaults insserv perl-fcgi service nginx start service perl-fcgi start cd /usr/share/nginx/www pico index.cgi [ Start Copy & Paste ] #!/usr/bin/perl print "Content-type:text/html\n\n"; print <Perl Environment Variables

Perl Environment Variables

EndOfHTML foreach $key (sort(keys %ENV)) { print "$key = $ENV{$key}
\n"; } print ""; [ End Copy & Paste ] CTRL-X to save. chmod 755 index.cgi Now, test the /index.cgi in your browser as seen in the video. You're Done!