I have a website containing my portfolio, which is hosted in an AWS S3 Bucket. it used to work fine, but suddenly the contact me section stopped working.
I have a javascript file, contact_me.js referring to a php file, contact_me.php. When I try to click "Send" to send a mail to my email adress, I get the error
"mail/contact_me.php:1 Failed to load resource: the server responded with a status of 403 (Forbidden)"
When I just navigate in my browser to the path, I download the file, so I do seem to have access to it.
I have also gotten this error, while trying to change permissions in AWS, but to no avail:
jquery.min.js:4
POST http://ReplacedWithDummySite/mail/contact_me.php 403 (Forbidden)
send @ jquery.min.js:4
ajax @ jquery.min.js:4
submitSuccess @ contact_me.js:21
(anonymous) @ jqBootstrapValidation.js:76
dispatch @ jquery.min.js:3
r.handle @ jquery.min.js:3
The line where it goes wrong is this: "g.send(b.hasContent && b.data || null)"
I have not done anything for this to break: it used to work just fine. I have checked the bucket permissions, since the obvious thing would be that the permissions are not public. I have set everything to public, and have the following bucket policy:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowPublicRead",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:*",
"Resource": "arn:aws:s3:::aws-website-dummyarn/*"
}
]
}