|
@@ -33,32 +33,32 @@ http {
|
|
|
root /;
|
|
|
index index.html;
|
|
|
|
|
|
- location /hello {
|
|
|
+ location = /hello {
|
|
|
add_header Content-Type text/plain;
|
|
|
content_by_php '
|
|
|
echo "Hello, World!";
|
|
|
';
|
|
|
}
|
|
|
|
|
|
- location /json {
|
|
|
+ location = /json {
|
|
|
add_header Content-Type application/json;
|
|
|
content_by_php '
|
|
|
echo json_encode(["message" => "Hello, World!"]);
|
|
|
';
|
|
|
}
|
|
|
-
|
|
|
- location /dbraw {
|
|
|
- add_header Content-Type application/json;
|
|
|
+
|
|
|
+ location = /fortune {
|
|
|
+ add_header Content-Type "text/html; charset=UTF-8";
|
|
|
content_by_php '
|
|
|
- $_GET = ngx::query_args();
|
|
|
- include "/dbraw.php";
|
|
|
+ include "fortune.php";
|
|
|
';
|
|
|
}
|
|
|
|
|
|
- location /fortune {
|
|
|
- add_header Content-Type "text/html; charset=UTF-8";
|
|
|
+ location /dbraw {
|
|
|
+ add_header Content-Type application/json;
|
|
|
content_by_php '
|
|
|
- include "/fortune.php";
|
|
|
+ $_GET = ngx::query_args();
|
|
|
+ include "dbraw.php";
|
|
|
';
|
|
|
}
|
|
|
|
|
@@ -66,7 +66,7 @@ http {
|
|
|
add_header Content-Type application/json;
|
|
|
content_by_php '
|
|
|
$_GET = ngx::query_args();
|
|
|
- include "/updateraw.php";
|
|
|
+ include "updateraw.php";
|
|
|
';
|
|
|
}
|
|
|
}
|