一、先查看nginx有没有安装某模块
nginx -V

二、进到lnmp1.7文件夹,找到lnmp.conf编辑
然后编辑 lnmp.conf 在 Nginx_Modules_Options 引号内加入 –with-http_realip_module (加入这个模块–with-stream_ssl_preread_module)
Download_Mirror='https://soft.vpser.net'
Nginx_Modules_Options='--with-http_realip_module'
PHP_Modules_Options=''
##MySQL/MariaDB database directory##
MySQL_Data_Dir='/usr/local/mysql/var'
MariaDB_Data_Dir='/usr/local/mariadb/var'
##Default website home directory##
Default_Website_Dir='/home/wwwroot/default'
Enable_Nginx_Openssl='y'
Enable_PHP_Fileinfo='n'
Enable_Nginx_Lua='n'
Enable_Swap='y'
~
三、然后执行./upgrade.sh nginx 输入自己想要的nginx版本号,即可