いくつかの画面を遷移する PHP プログラム(具体的には MediaWiki)を CloudFront 経由で発信したいと思いました。
その PHP プログラムに CLoudFront 経由でアクセスすると、
502 ERROR The request could not be satisfied.
が表示されます。
オリジンの URL にアクセスすると、正常な画面が表示されます。
また、PHP のプログラムからの遷移で、オリジンの URL にリダイレクトされる場合もあります。
CloudFront に設定している Behavior は以下の通りです。(WordPress の AWS for WordPress で設定される Behavior を参考にしました。)
フィールド | 値 |
---|---|
Path Pattern | *.php |
Viewer Protocol Policy | Redirect HTTP to HTTPS |
Allowed HTTP Methods | GET, HEAD, OPTIONS, PUT, POST, PATCH, DELETE |
Cache Based on Selected Request Headers | All |
Object Caching | Use Origin Cache Headers |
Minimum TTL | 0 |
Maximum TTL | 31536000 |
Default TTL | 86400 |
Forward Cookies | All |
Query String Forwarding and Caching Forward | all, cache based on all |
CloudFront 経由でブラウザに表示されるエラーは
502 ERROR The request could not be satisfied. CloudFront wasn't able to connect to the origin. We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner. If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.
Cache か Header あたりが怪しいと思うのですが、うまくいきません。
どうぞよろしくお願いします。
あなたの回答
tips
プレビュー