Aws beanstalk 403 error during deployment

Hi, I am using Amazon's elastic web services beanstalk. Every time I use git aws.push, my php application loads successfully. However, when I click on the URL, it says

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

My server options:

64-bit Amazon Linux 2014.03 v1.0.2 with PHP 5.4 running

What could be the reason for this? Thanks

+8
source share
4 answers

Credit Rakesha Bollampal:

I think your application is inside a folder. If so, change the EBS configuration for the document root directory or add the file to the root directory to redirect to this subfolder. To change the document root, go to the EBS console> Application> Configuration> Software configuration and change the "Document root" in the "Container Settings" section

+16
source

If your laravel project is located in the AppFolder folder, for example, on your local drive, do not create your zip file by right-clicking on the AppFolder. Instead use below.

Open AppFolder, select all the files (including the shared folder) and select to add to anyName.zip (anyName can also be an AppFolder). Download this anyName.zip to your Beanstalk environment.

You can change the document root to '/ public' go to the EBS console> Application> Configuration> Software configuration and change the "Document root" in the "Container Settings" section

+1
source

The URL itself is not suitable for opening your web page. My webpage is organized into folders. To open the page with the local path "/views/index.html", the correct URL would be " http://namespace.region.elasticbeanstalk.com /views/index.html ".

This one works for me;)

0
source

It may help you better ..

Normal zip downloads from github will create problems for directories and subdirectories. Better use gitbash to archive any file. If you use Git to control the source code of your application, use the git archive command to create the source package.

 $ git archive -v -o myapp.zip --format=zip HEAD 
0
source

All Articles