Raspberry Pi PHP Environment Configuration Resolution page blank

Source: Internet
Author: User

A lot of relevant online tutorials, here is not detailed, mainly in the installation after the completion of the page will appear blank, unable to parse the normal PHP.

1. Install PHP Environment:

sudo apt-get install nginx php5-fpm php5-cgi php5-cli php5-curl php5-gd php5-mcrypt php5-mysql php5-memcache php5-gd php5- SQLite php5-cgi php5-xmlrpc mysql-server mysql-client

If you don't need a MySQL environment, remove the last two mysql-server mysql-client

2. Modify the Site configuration file:

sudo nano/etc/nginx/sites-available/default

Modify to the following content:

server {    listen;    server_name raspiweb.dyndns.org;    root/var/www/;     Access_log  /var/log/nginx/localhost.access.log;    #error_page 404/404.html;     if (!-e $request _filename)    {        rewrite ^ (. *) $/index.php$1 last;    }     Location/{        index  index.html index.htm index.php default.html default.htm default.php;    }     Location ~* ^.+. (Jpg|jpeg|gif|css|png|js|ico|xml) $ {        access_log  off;        Expires 1d;    }     Location ~. *\.php (\/.*) *$ {        fastcgi_split_path_info ^ (. +\.php) (/.+) $;        Fastcgi_pass Unix:/var/run/php5-fpm.sock;        Fastcgi_index index.php;        Fastcgi_param script_filename $document _root$fastcgi_script_name;        Include Fastcgi_params;    }}

It should be stated that the site Directory is/var/www/, focusing on this sentence:

Fastcgi_param script_filename $document _root$fastcgi_script_name;

If it's less, add it.

Raspberry Pi PHP Environment Configuration Resolution page blank

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.