- 최신
- 최다 투표
- 가장 많은 댓글
Hello.
The content of Elasticbeanstalk's php sample application is placed in "/var/www/html", so setting the document root to "/web" will result in an error.
Even if you set the "DocumentRoot" value, ElasticBeanstalk should not automatically create the directory, so that error will occur.
For example, if your custom application has content in a directory called "/web", the value of "DocumentRoot" should be "/web".
ls -la /var/www/html/
total 20
drwxr-xr-x. 2 webapp webapp 107 Mar 8 00:49 .
drwxr-xr-x. 3 root root 21 Mar 8 00:49 ..
-rw-r--r--. 1 webapp webapp 90 Sep 29 19:02 cron.yaml
-rw-r--r--. 1 webapp webapp 2769 Sep 29 19:02 index.php
-rw-r--r--. 1 webapp webapp 189 Sep 29 19:02 logo_aws_reduced.gif
-rw-r--r--. 1 webapp webapp 367 Sep 29 19:02 scheduled.php
-rw-r--r--. 1 webapp webapp 3490 Sep 29 19:02 styles.css
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_PHP.container.html#php-console
Document root – The folder that contains your site's default page. If your welcome page is not at the root of your source bundle, specify the folder that contains it relative to the root path. For example, /public if the welcome page is in a folder named public.