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;
}
本文介绍了如何在Ubuntu系统上安装LNMP(Linux+Nginx+MySQL+PHP)开发环境,并详细列出了所需的软件包。此外,还提供了针对访问PHP文件时报502错误的nginx配置解决方案。
357

被折叠的 条评论
为什么被折叠?



