0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

This distribution is not configured to allow the HTTP request method that was used for this request.

Posted at

AWS上で、WordPressは以下のような構成で構築されています。

User Client <--> ELB <--> Cloudfront <--> EC2 <--> Wordpress

WordPressのトップ画面は問題なく表示できましたが、ログイン時に以下のエラーが発生してしまいました。

403 ERROR
The request could not be satisfied.
This distribution is not configured to allow the HTTP request method that was used for this request. The distribution supports only cachable requests. 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.

エラーの原因はいくつか考えられますが、今回はHTTPメソッドのPOSTが許可されていなかったことが問題でした。

image.png

GET, HEADGET, HEAD, OPTIONS, PUT, POST, PATCH, DELETE

image.png

まとめ

WordPressのログインエラーに関連するCloudFrontの403エラーは、主にHTTPメソッド制限に起因しています。CloudFrontのビヘイビアやキャッシュ設定を確認し、POSTメソッドを許可することで、問題を解消できるでしょう。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?