Hello!
2012/11/18 812120608:
> 你好春哥,我在你新浪博客里看到了你的关于nginx变量漫谈的几篇文章,你在其中多次举例:
> server {
> listen 8080;
>
> location /test {
> set $foo hello;
> echo "foo: $foo";
> }
> 执行curl 'http://localhost:8080/test,输出foo:hello。;
>
> 但是我在执行的时候总是提示404,并没有输出foo:hello,我已经打了你写的echo-nginx-module模块,我想问下你我是不是哪个环节的配置漏了?
>
请确认你实际启动的 nginx 进程确实使用的是你自己的 nginx.conf 配置文件。返回 404
应当是使用了另一个配置文件。同时可以检查你的 nginx 的错误日志文件中的输出。
假设你的配置文件在 /a/b/nginx.conf,则可以用下面的命令启动 nginx 以确保使用的是该配置文件:
/path/to/nginx -c /a/b/nginx.conf
同时抄送给 openresty 中文邮件列表:https://groups.google.com/group/openresty
Regards,
-agentzh