user www-data; worker_processes auto; error_log stderr error; worker_rlimit_nofile 200000; daemon off; events { worker_connections 16384; multi_accept on; } http { include /etc/nginx/mime.types; access_log off; server_tokens off; sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; open_file_cache max=2000 inactive=20s; open_file_cache_valid 60s; open_file_cache_min_uses 5; open_file_cache_errors off; php_ini_path /deploy/conf/php.ini; server { listen 8080 reuseport; server_name localhost; root /; index index.html; location /hello { add_header Content-Type text/plain; content_by_php ' echo "Hello, World!"; '; } 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; content_by_php ' $_GET = ngx::query_args(); include "/dbraw.php"; '; } location /fortune { add_header Content-Type "text/html; charset=UTF-8"; content_by_php ' include "/fortune.php"; '; } location /update { add_header Content-Type application/json; content_by_php ' $_GET = ngx::query_args(); include "/updateraw.php"; '; } } }