Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

aws beanstalk 403 error while deploying

Hi I'm using amazon web services elastic beanstalk. Everytime I use git aws.push, my php application uploads successfully However, when I click on the url it says

Forbidden

You don't have permission to access / on this server.

My server specs:

64bit Amazon Linux 2014.03 v1.0.2 running PHP 5.4

What would be causing this? Thanks

like image 516
user1424508 Avatar asked May 10 '14 07:05

user1424508


People also ask

Why am I getting a 403 Forbidden error when I try to upload files in Amazon s3?

The "403 Forbidden" error can occur due to the following reasons: Permissions are missing for s3:PutObject to add an object or s3:PutObjectAcl to modify the object's ACL. You don't have permission to use an AWS Key Management Service (AWS KMS) key. There is an explicit deny statement in the bucket policy.

Why do I get an HTTP 403 Forbidden error when connecting to my API gateway APIs from a VPC?

The HTTP 403 Forbidden error most commonly occurs when private DNS is enabled for an API Gateway interface VPC endpoint that's associated with a VPC. In this scenario, all requests from the VPC to API Gateway APIs resolve to that interface VPC endpoint.


2 Answers

Credit to Rakesh Bollampally:

I think your application is inside a folder. If that is the case, change the EBS configuration for document root or have a file in root to redirect to that sub folder. To Change document root, go to EBS console>Application>configuration>Software configuration and change the "Document root" under "container options"

like image 51
user1424508 Avatar answered Sep 30 '22 00:09

user1424508


If your laravel project is in a folder called AppFolder for instance on your local drive, do not generate your zip file by rightclicking on AppFolder. Use the below instead.

Open the AppFolder, highlight all files (includes your public folder) and select to add to anyName.zip (anyName can be AppFolder also). Upload this anyName.zip to your Beanstalk environment.

You may change the document root to '/public' go to EBS console>Application>configuration>Software configuration and change the "Document root" under "container options"

like image 41
Habeeb Avatar answered Sep 30 '22 00:09

Habeeb