nginx.conf 918 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #worker_processes 1;
  2. pid /tmp/nginx.pid;
  3. error_log /dev/null crit;
  4. #error_log /tmp/test.log error;
  5. env LAPIS_ENVIRONMENT;
  6. events {
  7. worker_connections 16384;
  8. }
  9. http {
  10. access_log off;
  11. include mime.types;
  12. lua_package_path 'CWD/lapis/?.lua;;';
  13. upstream database {
  14. postgres_server DBHOSTNAME dbname=hello_world user=benchmarkdbuser password=benchmarkdbpass;
  15. }
  16. server {
  17. listen 8080;
  18. lua_code_cache on;
  19. charset "utf-8";
  20. location / {
  21. default_type text/html;
  22. set $_url "";
  23. content_by_lua_file "web.lua";
  24. }
  25. location /static/ {
  26. alias static/;
  27. }
  28. location /favicon.ico {
  29. alias static/favicon.ico;
  30. }
  31. location = /query {
  32. internal;
  33. postgres_pass database;
  34. postgres_query $echo_request_body;
  35. }
  36. }
  37. }