Quellcode durchsuchen

Whoops, placed the config blocks wrong

Mikael Lindberg vor 12 Jahren
Ursprung
Commit
b2a243d64f
1 geänderte Dateien mit 10 neuen und 10 gelöschten Zeilen
  1. 10 10
      openresty/nginx.conf

+ 10 - 10
openresty/nginx.conf

@@ -9,19 +9,19 @@ events {
 http {
     access_log off;
     lua_package_path 'CWD/openresty/?.lua;;';
-    location /plaintext {
-        default_type "text/plain";
-        content_by_lua 'ngx.print("Hello, world!")';
-    }
-
-    location /json {
-        default_type "application/json";
-        content_by_lua 'ngx.print(require("cjson").encode({message = "Hello, World!"}))';
-    }
     server {
         listen       8080;
+        location /plaintext {
+            default_type "text/plain";
+            content_by_lua 'ngx.print("Hello, world!")';
+        }
+
+        location /json {
+            default_type "application/json";
+            content_by_lua 'ngx.print(require("cjson").encode({message = "Hello, World!"}))';
+        }
         location / {
-            content_by_lua 'require("app").handler(ngx)';
+            content_by_lua 'require("app")()';
         }
     }
 }