Lightsail에 국한된 에러는 아니고, Nginx로 PDO(PHP Data Object)에 POST를 요청할 때 만날 수 있는 에러이다. 리눅스 기준으로 /etc/nginx/conf.d/default.conf 파일을 보면, server { root index server_name location / { ... } location ~ \.php$ { fastcgi_pass php-handler; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; fastcgi_read_timeout 300; } . . . } 두 번째 location ~ \.php$ { ... } 을 추가해주면 된다. CORS ..