Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"load_module" directive is specified too late. #69

Closed
gnought opened this issue Nov 7, 2017 · 1 comment · May be fixed by #84
Closed

"load_module" directive is specified too late. #69

gnought opened this issue Nov 7, 2017 · 1 comment · May be fixed by #84

Comments

@gnought
Copy link

gnought commented Nov 7, 2017

Define TEST_NGINX_LOAD_MODULES environmental variable will cause an error when testing stream-lua-nginx-module/t/002-content.t

The excerpt of generated nginx.conf is as follows:

worker_processes  1;
daemon on;
master_process off;
error_log /build/ngxc/t/servroot/logs/error.log debug;
pid       /build/ngxc/t/servroot/logs/nginx.pid;
env MOCKEAGAIN_VERBOSE;
env MOCKEAGAIN;
env MOCKEAGAIN_WRITE_TIMEOUT_PATTERN;
env LD_PRELOAD;
env LD_LIBRARY_PATH;
env DYLD_INSERT_LIBRARIES;
env DYLD_FORCE_FLAT_NAMESPACE;
#env LUA_PATH;
#env LUA_CPATH;

stream {

    server {
        listen 1985;

    content_by_lua_block { ngx.say(nil) }

    }
}
load_module /build/ngxc/ngx/modules/ngx_http_headers_more_filter_module.so; 
http {
...
}
@agentzh
Copy link
Member

agentzh commented Nov 7, 2017

@gnought Seems like the load_module directives should be inserted before the stream {} config block. Will you contribute a pull request to the test-nginx repo below?

https://github.com/openresty/test-nginx

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants