
我server
在我的 中添加了一個節virtual.conf
,現在 nginx 似乎在重新加載配置時遇到問題。
此時我不知道到底出了什麼問題,也不知道如何更好地調試。非常感激任何的幫助。
配置測試成功:
root@server:~# service nginx configtest
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
我正在跟踪日誌文件。重新載入後,會記錄以下錯誤。據我所知,新的配置沒有被使用。
root@server:~# service nginx reload
Reloading nginx: [ OK ]
root@server:~#
==> /var/log/nginx/error.log <==
nginx object version 0.8.54 does not match bootstrap parameter 1.0.15 at /usr/lib64/perl5/XSLoader.pm line 94.
Compilation failed in require.
BEGIN failed--compilation aborted.
2012/10/18 12:31:07 [alert] 9620#0: perl_parse() failed: 2
這是我正在運行的 nginx 版本:
root@server:~# yum info nginx
Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile
* base: ftp.udc.es
* epel: mirror.nl.leaseweb.net
* extras: ftp.udc.es
* updates: ftp.cica.es
Installed Packages
Name : nginx
Arch : x86_64
Version : 1.0.15
Release : 2.el6
[...]
伺服器作業系統:CentOS 版本 6.3(最終版)
答案1
原來是在沒有重啟服務的情況下升級了nginx套件。
只需重新啟動服務即可將其解除。