Guest User

Untitled

a guest
Dec 28th, 2016
90
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. user www-data www-data;
  2. worker_processes 3;
  3.  
  4.  
  5. events {
  6. worker_connections 1024;
  7. }
  8.  
  9. http {
  10.  
  11. server {
  12. listen 80;
  13. server_name localhost;
  14.  
  15.  
  16. location /dev_auth {
  17. internal;
  18. access_log /var/log/nginx/nginx_auth_access.log;
  19. error_log /var/log/nginx/nginx_auth_error.log;
  20.  
  21. content_by_lua '
  22. ngx.log(ngx.NOTICE, "TEST_MESSAGE")
  23. ngx.say("Hello,world!")
  24. ';
  25. }
  26.  
  27.  
  28. location /dev_test1 {
  29. access_log /var/log/nginx/nginx_access.log;
  30. error_log /var/log/nginx/nginx_error.log;
  31.  
  32. content_by_lua '
  33. local res = ngx.location.capture("/dev_auth")
  34. ngx.say(res.body)
  35. ';
  36. }
  37.  
  38. }
  39.  
  40. }
RAW Paste Data