ubuntu 下安装lnmp开发环境
apt-get install mysql-server mysql-client apt-get install nginx apt-get install php5-fpm apt-get install php5-mysql php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl
修改nginx配置文件后,发现访问php文件会报502错误,修改配置如下
/etc/nginx/sites-enabled/default 中:
location ~ \.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; }