首页 > 其他 > 详细

teginx编译安装FAQ

时间:2019-06-18 18:44:47      阅读:176      评论:0      收藏:0      [点我收藏+]

环境:centos7 

  • 问题现象:编译安装完成之后,启动nginx报错
root@openwaf:/etc/nginx# /etc/init.d/nginx -t
/etc/init.d/nginx: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
  • 解决办法:
root@openwaf:/etc/nginx# cp -p /usr/local/lib64/libssl.so.1.1 /usr/lib64/
root@openwaf:/etc/nginx# cp -p /usr/local/lib64/libcrypto.so.1.1 /usr/lib64/

 


 

问题现象:报错如下图,原因可能是nginx配置中的用户不存在或者用户错误。

root@openwaf:/etc/nginx# /etc/init.d/nginx -t
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: [emerg] getpwnam("nginx") failed
nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed 

解决方法:

root@openwaf:/etc/nginx# cat /etc/nginx/nginx.conf |grep ^user
user  nginx;
root@openwaf:/etc/nginx# useradd -M -s /sbin/nologin nginx  

root@openwaf:/etc/nginx# /etc/init.d/nginx -t

nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok

nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful

teginx编译安装FAQ

原文:https://www.cnblogs.com/petersonx/p/11046683.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!