
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
ログファイルを tail しています。再ロードすると、次のエラーがログに記録されます。私が見る限り、新しい構成は使用されていません。
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
[...]
サーバー OS: CentOS リリース 6.3 (最終)
答え1
サービスを再起動せずに nginx パッケージがアップグレードされたことが判明しました。
サービスを再起動するだけで問題は解消されました。