LNMPA(LNMP0.7)安装出现502 Bad Gateway解决方法


LNMPA是什么?
简单的说就是Linux+Nginx+MySql+PHP+Apache
 
怎么会用这种构架?
Nginx和Apache都是搭建网站服务器的,怎么两个都装了,那怎么办啊?是这样的。Nginx作为前段服务器处理静态请求,如果启用动态请求就要用Apache了,毕竟人家Apache是多年的老牌软件了。
 
这样搭建有很大的优势的,官网上这么说“LNMPA使用Nginx作为前端服务能够更快更及时的静态页面、js、图片等,当客户端请求访问动态页面时由Nginx的反向代理给Apache处理,Apache处理完再交予Nginx返回给客户端。
采用LNMPA能够更好的解决LNMP架构中由于PHP-FPM方面产生的502错误,同时能够为提供更安全的多用户多站点环境。”
 
 
 
这次更新了什么?
 
优化安装过程,修复多处安装错误处理;添加LNMP至LNMPA升级包;重写PureFTP安装包,实现只需要输入密码即可安装成功;Nginx升级至0.8.54、MySQL升级至5.1.54、PHP升级至5.2.17;优化PHP升级脚本;优化Nginx升级脚本;添加LNMPA PHP版本升级工具;优化eAccelerator自动安装脚本,支持LNMPA同时多次安装都不会出现多次加载;优化ionCube自动安装脚本,支持LNMPA同时多次安装都不会出现多次加载;;去除了Suhosin;下载安装?
下载:http://www.lnmp.org/download.html
 
安装:与Lnmp0.6的安装方法一样的,具体看http://www.lnmp.org/install.html,不过这个是LNMP的安装,还要加上Apache的安装,安装完LNMP,然后再执行./apache.sh安装Apache。
 
LNMP0.6到0.7?
在上面的更新纪录中也看到了,这次0.7比0.6升级了Nginx、MySQL、PHP,添加了Apache,所以只要解压缩完整版的安装包,进入目录执行upgrade_nginx.sh、upgrade_nginx.sh、upgrade_php.sh,然后再执行apache.sh即可。
 
对于更新的话,最好就是先卸载0.6,然后再全新安装0.7。
 
状态管理
LNMPA状态管理:/root/lnmpa {start|stop|reload|restart|kill|status}
Nginx状态管理:/etc/init.d/nginx {start|stop|reload|restart}
PureFTPd状态管理:/etc/init.d/pureftpd {start|stop|restart|kill|status}
MySQL状态管理:/etc/init.d/mysql {start|stop|restart|reload|force-reload|status}
Apache状态管理:/etc/init.d/httpd {start|stop|restart|graceful|graceful-stop|configtest|status}
 
虚拟主机管理
1、LNMPA添加虚拟主机:/root/vhost.sh
 
2、删除虚拟主机,ssh执行:rm /usr/local/nginx/conf/vhost/域名.conf 同时需要:rm/usr/local/apache/conf/vhost/域名.conf
 
状态管理
LNMPA状态管理:/root/lnmpa {start|stop|reload|restart|kill|status}
Nginx状态管理:/etc/init.d/nginx {start|stop|reload|restart}
PureFTPd状态管理:/etc/init.d/pureftpd {start|stop|restart|kill|status}
MySQL状态管理:/etc/init.d/mysql {start|stop|restart|reload|force-reload|status}
Apache状态管理:/etc/init.d/httpd {start|stop|restart|graceful|graceful-stop|configtest|status}
 
相关图形界面程序
phpinfo : http://前面输入的域名或IP/phpinfo.php
phpMyAdmin : http://前面输入的域名或IP/phpmyadmin/
探针: http://前面输入的域名或IP/p.php
PureFTP管理界面:http://前面输入的域名或IP/ftp/
 
LNMPA相关目录
nginx : /usr/local/nginx
mysql : /usr/local/mysql
php : /usr/local/php
apache : /usr/local/apache
网站目录: /home/wwwroot/
Nginx日志目录:/home/wwwlogs/
 
LNMPA相关配置文件
Nginx主配置文件:/usr/local/nginx/conf/nginx.conf
MySQL配置文件:/etc/my.cnf
PHP配置文件:/usr/local/php/etc/php.ini
PureFtpd配置文件:/usr/local/pureftpd/pure-ftpd.conf
PureFtpd MySQL配置文件:/usr/local/pureftpd/pureftpd-mysql.conf
Apache配置文件:/usr/local/apache/conf/httpd.conf
 
更多详情,请查看官网http://www.lnmp.org/lnmpa.html

相关内容

    暂无相关文章