Http server with PHP on RaspberryPI

Totally awesome guide is at http://rasberrypibeginnersguide.tumblr.com/post/27283563130/nginx-php5-on-raspberry-pi-debian-wheezyBut instead using provided silex site config file, you should configure root folder of web server to serve php scripts….

Totally awesome guide is at http://rasberrypibeginnersguide.tumblr.com/post/27283563130/nginx-php5-on-raspberry-pi-debian-wheezy
But instead using provided silex site config file, you should configure root folder of web server to serve php scripts. To do so please rm symlink to
silex file and edit

/etc/nginx/sites-available/default

Set root folder to /var/www

#       root /usr/share/nginx/www;
        root /var/www;

Add index.php as a index file
index index.html index.htm index.php;

And configure all php files to be parsed by fastCGI php bridge set up on port 9000. Just put all below somewhere in default file
 ## Parse all .php file in the /var/www directory
            location ~ \.php$ {
                    fastcgi_split_path_info ^(.+\.php)(.*)$;
                    fastcgi_pass   127.0.0.1:9000;
                    fastcgi_index  index.php;
                    fastcgi_param  SCRIPT_FILENAME  /var/www/silex$fastcgi_script_name;
                    include fastcgi_params;
                    fastcgi_param  QUERY_STRING     $query_string;
                    fastcgi_param  REQUEST_METHOD   $request_method;
                    fastcgi_param  CONTENT_TYPE     $content_type;
                    fastcgi_param  CONTENT_LENGTH   $content_length;
                    fastcgi_intercept_errors        on;
                    fastcgi_ignore_client_abort     off;
                    fastcgi_connect_timeout 60;
                    fastcgi_send_timeout 180;
                    fastcgi_read_timeout 180;
                    fastcgi_buffer_size 128k;
                    fastcgi_buffers 4 256k;
                    fastcgi_busy_buffers_size 256k;
                    fastcgi_temp_file_write_size 256k;
            }
Now restart ngix as mentioned in original article and enjoy PHP on RPi!
You May Also Like

TouK na targach pracyTouK at the job fair

Zapraszamy na XI Targi Pracy i Praktyk dla Elektroników i Informatyków. Odwiedź nasze stoisko w dniach 4-5 marca w godz. 9:30-15:30. Politechnika Warszawska Pierwsze piętro budynku Wydziału Elektroniki i Techniki Informacyjnych Nowowiejska 15/19We invite you to 11th Job and Internship Fair for Electronic Engineers and IT Specialists. Come and visit our stand between 4-5 March 9:30 am and 15 :30 pm Warsaw University of Technology the first floor of the Electronics faculty building Nowowiejska 15/19