首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >拉勒维尔和AWS弹性豆柄网站不工作?

拉勒维尔和AWS弹性豆柄网站不工作?
EN

Stack Overflow用户
提问于 2017-08-19 08:25:11
回答 3查看 2.4K关注 0票数 0

我有一个使用Laravel5.4的EC2开发实例,它的工作非常好,因此我想部署ElasticBean秸秆应用程序。

我遵循了这一指南:

https://deliciousbrains.com/scaling-laravel-using-aws-elastic-beanstalk-part-3-setting-elastic-beanstalk

一切似乎都是正确的,弹性豆柄已经成功地部署好了,但是当我尝试访问它给我的url时:http://liveandnow.eu-west-2.elasticbeanstalk.com/

我得到:

403禁止错误和消息:

代码语言:javascript
复制
Forbidden
You don't have permission to access / on this server.

根据指南,一旦应用已经部署,我应该可以看到我的应用程序在这个网址,但我不能。

有人知道为什么会这样吗?

//编辑

需要注意的是,从ElasticBean秸秆创建的EC2实例没有公共ip地址,但是VPC配置了具有弹性IP的NAT网关。

//编辑

弹性豆中的错误日志

/var/log/httpd/error_log

代码语言:javascript
复制
 [Sat Aug 19 09:03:48.595736 2017] [autoindex:error] [pid 2997] [client 10.0.2.115:11488] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive
[Sat Aug 19 09:04:00.251525 2017] [autoindex:error] [pid 2971] [client 10.0.0.33:39820] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive
[Sat Aug 19 09:04:03.613215 2017] [autoindex:error] [pid 3008] [client 10.0.2.115:11492] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive



-------------------------------------
/var/log/httpd/access_log
-------------------------------------
  10.0.0.33 (-) - - [19/Aug/2017:08:56:44 +0000] "GET / HTTP/1.1" 403 209 "-" "ELB-HealthChecker/2.0"
   10.0.0.33 (-) - - [19/Aug/2017:09:00:00 +0000] "GET / HTTP/1.1" 403 209 "-" "ELB-HealthChecker/2.0"
10.0.2.115 (-) - - [19/Aug/2017:09:00:03 +0000] "GET / HTTP/1.1" 403 209 "-" "ELB-HealthChecker/2.0"
10.0.0.33 (-) - - [19/Aug/2017:09:00:15 +0000] "GET / HTTP/1.1" 403 209 "-" "ELB-HealthChecker/2.0"
10.0.2.115 (-) - - [19/Aug/2017:09:00:18 +0000] "GET / HTTP/1.1" 403 209 "-" "ELB-HealthChecker/2.0"
10.0.0.33 (-) - - [19/Aug/2017:09:00:30 +0000] "GET / HTTP/1.1" 403 209 "-" "ELB-HealthChecker/2.0"
10.0.2.115 (-) - - [19/Aug/2017:09:00:33 +0000] "GET / HTTP/1.1" 403 209 "-" "ELB-HealthChecker/2.0"
10.0.0.33 (-) - - [19/Aug/2017:09:00:45 +0000] "GET / HTTP/1.1" 403 209 "-" "ELB-HealthChecker/2.0"
10.0.2.115 (-) - - [19/Aug/2017:09:00:48 +0000] "GET / HTTP/1.1" 403 209 "-" "ELB-HealthChecker/2.0"
10.0.0.33 (-) - - [19/Aug/2017:09:01:00 +0000] "GET / HTTP/1.1" 403 209 "-" "ELB-HealthChecker/2.0"
10.0.2.115 (-) - - [19/Aug/2017:09:01:03 +0000] "GET / HTTP/1.1" 403 209 "-" "ELB-HealthChecker/2.0"
10.0.0.33 (-) - - [19/Aug/2017:09:01:15 +0000] "GET / HTTP/1.1" 403 209 "-" "ELB-HealthChecker/2.0"
10.0.2.115 (-) - - [19/Aug/2017:09:01:18 +0000] "GET / HTTP/1.1" 403 209 "-" "ELB-HealthChecker/2.0"
10.0.0.33 (-) - - [19/Aug/2017:09:01:30 +0000] "GET / HTTP/1.1" 403 209 "-" "ELB-HealthChecker/2.0"
10.0.2.115 (-) - - [19/Aug/2017:09:01:33 +0000] "GET / HTTP/1.1" 403 209 "-" "ELB-HealthChecker/2.0"
10.0.0.33 (-) - - [19/Aug/2017:09:01:45 +0000] "GET / HTTP/1.1" 403 209 "-" "ELB-HealthChecker/2.0"
10.0.2.115 (-) - - [19/Aug/2017:09:01:48 +0000] "GET / HTTP/1.1" 403 209 "-" "ELB-HealthChecker/2.0"
10.0.0.33 (-) - - [19/Aug/2017:09:02:00 +0000] "GET / HTTP/1.1" 403 209 "-" "ELB-HealthChecker/2.0"
10.0.2.115 (-) - - [19/Aug/2017:09:02:03 +0000] "GET / HTTP/1.1" 403 209 "-" "ELB-HealthChecker/2.0"
10.0.0.33 (-) - - [19/Aug/2017:09:02:15 +0000] "GET / HTTP/1.1" 403 209 "-" "ELB-HealthChecker/2.0"
10.0.2.115 (-) - - [19/Aug/2017:09:02:18 +0000] "GET / HTTP/1.1" 403 209 "-" "ELB-HealthChecker/2.0"
10.0.0.33 (-) - - [19/Aug/2017:09:02:30 +0000] "GET / HTTP/1.1" 403 209 "-" "ELB-HealthChecker/2.0"
10.0.2.115 (-) - - [19/Aug/2017:09:02:33 +0000] "GET / HTTP/1.1" 403 209 "-" "ELB-HealthChecker/2.0"
10.0.0.33 (-) - - [19/Aug/2017:09:02:45 +0000] "GET / HTTP/1.1" 403 209 "-" "ELB-HealthChecker/2.0"
10.0.2.115 (-) - - [19/Aug/2017:09:02:48 +0000] "GET / HTTP/1.1" 403 209 "-" "ELB-HealthChecker/2.0"
10.0.0.33 (-) - - [19/Aug/2017:09:03:00 +0000] "GET / HTTP/1.1" 403 209 "-" "ELB-HealthChecker/2.0"
10.0.2.115 (-) - - [19/Aug/2017:09:03:03 +0000] "GET / HTTP/1.1" 403 209 "-" "ELB-HealthChecker/2.0"
10.0.0.33 (-) - - [19/Aug/2017:09:03:15 +0000] "GET / HTTP/1.1" 403 209 "-" "ELB-HealthChecker/2.0"
10.0.2.115 (-) - - [19/Aug/2017:09:03:18 +0000] "GET / HTTP/1.1" 403 209 "-" "ELB-HealthChecker/2.0"
10.0.0.33 (-) - - [19/Aug/2017:09:03:30 +0000] "GET / HTTP/1.1" 403 209 "-" "ELB-HealthChecker/2.0"
10.0.2.115 (-) - - [19/Aug/2017:09:03:33 +0000] "GET / HTTP/1.1" 403 209 "-" "ELB-HealthChecker/2.0"
10.0.0.33 (-) - - [19/Aug/2017:09:03:45 +0000] "GET / HTTP/1.1" 403 209 "-" "ELB-HealthChecker/2.0"
10.0.2.115 (-) - - [19/Aug/2017:09:03:48 +0000] "GET / HTTP/1.1" 403 209 "-" "ELB-HealthChecker/2.0"
10.0.0.33 (-) - - [19/Aug/2017:09:04:00 +0000] "GET / HTTP/1.1" 403 209 "-" "ELB-HealthChecker/2.0"
10.0.2.115 (-) - - [19/Aug/2017:09:04:03 +0000] "GET / HTTP/1.1" 403 209 "-" "ELB-HealthChecker/2.0"



-------------------------------------
/var/log/eb-activity.log
-------------------------------------
  league/flysystem suggests installing league/flysystem-aws-s3-v2 (Allows you to use S3 storage with AWS SDK v2)
  league/flysystem suggests installing league/flysystem-azure (Allows you to use Windows Azure Blob storage)
  league/flysystem suggests installing league/flysystem-cached-adapter (Flysystem adapter decorator for metadata caching)
  league/flysystem suggests installing league/flysystem-eventable-filesystem (Allows you to use EventableFilesystem)
  league/flysystem suggests installing league/flysystem-rackspace (Allows you to use Rackspace Cloud Files)
  league/flysystem suggests installing league/flysystem-sftp (Allows you to use SFTP server storage via phpseclib)
  league/flysystem suggests installing league/flysystem-webdav (Allows you to use WebDAV storage)
  league/flysystem suggests installing league/flysystem-ziparchive (Allows you to use ZipArchive adapter)
  league/flysystem suggests installing spatie/flysystem-dropbox (Allows you to use Dropbox storage)
  league/flysystem suggests installing srmklive/flysystem-dropbox-v2 (Allows you to use Dropbox storage for PHP 5 applications)
  laravel/framework suggests installing doctrine/dbal (Required to rename columns and drop SQLite columns (~2.5).)
  laravel/framework suggests installing league/flysystem-rackspace (Required to use the Flysystem Rackspace driver (~1.0).)
  laravel/framework suggests installing nexmo/client (Required to use the Nexmo transport (~1.0).)
  laravel/framework suggests installing pda/pheanstalk (Required to use the beanstalk queue driver (~3.0).)
  laravel/framework suggests installing pusher/pusher-php-server (Required to use the Pusher broadcast driver (~2.0).)
  laravel/framework suggests installing symfony/psr-http-message-bridge (Required to psr7 bridging features (0.2.*).)
  aws/aws-sdk-php suggests installing aws/aws-php-sns-message-validator (To validate incoming SNS notifications)
  aws/aws-sdk-php suggests installing doctrine/cache (To use the DoctrineCacheAdapter)
  intervention/image suggests installing intervention/imagecache (Caching extension for the Intervention Image library)
  psy/psysh suggests installing ext-pdo-sqlite (The doc command requires SQLite to work.)
  psy/psysh suggests installing hoa/console (A pure PHP readline implementation. You'll want this if your PHP install doesn't already support readline or libedit.)
  predis/predis suggests installing ext-phpiredis (Allows faster serialization and deserialization of the Redis protocol)
  sebastian/global-state suggests installing ext-uopz (*)
  phpunit/php-code-coverage suggests installing ext-xdebug (^2.5.1)
  phpunit/phpunit suggests installing phpunit/php-invoker (~1.1)
  phpunit/phpunit suggests installing ext-xdebug (*)
  Writing lock file
  Generating optimized autoload files
  > Illuminate\Foundation\ComposerScripts::postUpdate
  > php artisan optimize
  Generating optimized class loader
  The compiled services file has been removed.
[2017-08-19T08:53:37.696Z] INFO  [2425]  - [Application update app-9fe7-170819_085316@6/AppDeployStage0/AppDeployPreHook/12_update_permissions.sh] : Starting activity...
[2017-08-19T08:53:38.185Z] INFO  [2425]  - [Application update app-9fe7-170819_085316@6/AppDeployStage0/AppDeployPreHook/12_update_permissions.sh] : Completed activity. Result:
  ++ /opt/elasticbeanstalk/bin/get-config container -k app_user
  + EB_APP_USER=webapp
  ++ /opt/elasticbeanstalk/bin/get-config container -k app_base_dir
  + EB_APP_BASE_DIR=/var/app
  ++ /opt/elasticbeanstalk/bin/get-config container -k app_staging_dir
  + EB_APP_STAGING_DIR=/var/app/ondeck
  ++ /opt/elasticbeanstalk/bin/get-config container -k app_logs_dir
  + EB_APP_LOGS_DIR=/var/app/support/logs
  + cd /var/app/ondeck
  + chown -R webapp:webapp /var/app
  + chown -R webapp:webapp /var/log/httpd
  + '[' -f app/SymfonyRequirements.php ']'
[2017-08-19T08:53:38.185Z] INFO  [2425]  - [Application update app-9fe7-170819_085316@6/AppDeployStage0/AppDeployPreHook] : Completed activity. Result:
  Successfully execute hooks in directory /opt/elasticbeanstalk/hooks/appdeploy/pre.
[2017-08-19T08:53:38.185Z] INFO  [2425]  - [Application update app-9fe7-170819_085316@6/AppDeployStage0/EbExtensionPostBuild] : Starting activity...
[2017-08-19T08:53:38.456Z] INFO  [2425]  - [Application update app-9fe7-170819_085316@6/AppDeployStage0/EbExtensionPostBuild/Infra-EmbeddedPostBuild] : Starting activity...
[2017-08-19T08:53:38.456Z] INFO  [2425]  - [Application update app-9fe7-170819_085316@6/AppDeployStage0/EbExtensionPostBuild/Infra-EmbeddedPostBuild] : Completed activity.
[2017-08-19T08:53:38.472Z] INFO  [2425]  - [Application update app-9fe7-170819_085316@6/AppDeployStage0/EbExtensionPostBuild] : Completed activity.
[2017-08-19T08:53:38.472Z] INFO  [2425]  - [Application update app-9fe7-170819_085316@6/AppDeployStage0/InfraCleanEbextension] : Starting activity...
[2017-08-19T08:53:38.497Z] INFO  [2425]  - [Application update app-9fe7-170819_085316@6/AppDeployStage0/InfraCleanEbextension] : Completed activity. Result:
  Cleaned ebextensions subdirectories from /var/app/ondeck.
[2017-08-19T08:53:38.497Z] INFO  [2425]  - [Application update app-9fe7-170819_085316@6/AppDeployStage0] : Completed activity. Result:
  Application update - Command CMD-AppDeploy stage 0 completed
[2017-08-19T08:53:38.497Z] INFO  [2425]  - [Application update app-9fe7-170819_085316@6/AppDeployStage1] : Starting activity...
[2017-08-19T08:53:38.497Z] INFO  [2425]  - [Application update app-9fe7-170819_085316@6/AppDeployStage1/AppDeployEnactHook] : Starting activity...
[2017-08-19T08:53:38.497Z] INFO  [2425]  - [Application update app-9fe7-170819_085316@6/AppDeployStage1/AppDeployEnactHook/01_flip.sh] : Starting activity...
[2017-08-19T08:53:38.701Z] INFO  [2425]  - [Application update app-9fe7-170819_085316@6/AppDeployStage1/AppDeployEnactHook/01_flip.sh] : Completed activity. Result:
  ++ /opt/elasticbeanstalk/bin/get-config container -k app_staging_dir
  + EB_APP_STAGING_DIR=/var/app/ondeck
  ++ /opt/elasticbeanstalk/bin/get-config container -k app_deploy_dir
  + EB_APP_DEPLOY_DIR=/var/app/current
  + '[' -d /var/app/current ']'
  + mv /var/app/current /var/app/current.old
  + mv /var/app/ondeck /var/app/current
  + nohup rm -rf /var/app/current.old
[2017-08-19T08:53:38.701Z] INFO  [2425]  - [Application update app-9fe7-170819_085316@6/AppDeployStage1/AppDeployEnactHook/99_reload_app_server.sh] : Starting activity...
[2017-08-19T08:53:38.779Z] INFO  [2425]  - [Application update app-9fe7-170819_085316@6/AppDeployStage1/AppDeployEnactHook/99_reload_app_server.sh] : Completed activity. Result:
  Equivalent Upstart operations: start httpd, stop httpd, restart httpd, status httpd
  Gracefully restarting httpd
  [OK]
[2017-08-19T08:53:38.779Z] INFO  [2425]  - [Application update app-9fe7-170819_085316@6/AppDeployStage1/AppDeployEnactHook] : Completed activity. Result:
  Successfully execute hooks in directory /opt/elasticbeanstalk/hooks/appdeploy/enact.
[2017-08-19T08:53:38.780Z] INFO  [2425]  - [Application update app-9fe7-170819_085316@6/AppDeployStage1/AppDeployPostHook] : Starting activity...
[2017-08-19T08:53:38.780Z] INFO  [2425]  - [Application update app-9fe7-170819_085316@6/AppDeployStage1/AppDeployPostHook/01_monitor_httpd_pid.sh] : Starting activity...
[2017-08-19T08:53:39.020Z] INFO  [2425]  - [Application update app-9fe7-170819_085316@6/AppDeployStage1/AppDeployPostHook/01_monitor_httpd_pid.sh] : Completed activity. Result:
  + chmod 0755 /var/run/httpd
  + /opt/elasticbeanstalk/bin/healthd-track-pidfile --proxy httpd
[2017-08-19T08:53:39.020Z] INFO  [2425]  - [Application update app-9fe7-170819_085316@6/AppDeployStage1/AppDeployPostHook] : Completed activity. Result:
  Successfully execute hooks in directory /opt/elasticbeanstalk/hooks/appdeploy/post.
[2017-08-19T08:53:39.020Z] INFO  [2425]  - [Application update app-9fe7-170819_085316@6/AppDeployStage1] : Completed activity. Result:
  Application version switch - Command CMD-AppDeploy stage 1 completed
[2017-08-19T08:53:39.020Z] INFO  [2425]  - [Application update app-9fe7-170819_085316@6/AddonsAfter] : Starting activity...
[2017-08-19T08:53:39.020Z] INFO  [2425]  - [Application update app-9fe7-170819_085316@6/AddonsAfter/ConfigLogRotation] : Starting activity...
[2017-08-19T08:53:39.020Z] INFO  [2425]  - [Application update app-9fe7-170819_085316@6/AddonsAfter/ConfigLogRotation/10-config.sh] : Starting activity...
[2017-08-19T08:53:39.111Z] INFO  [2425]  - [Application update app-9fe7-170819_085316@6/AddonsAfter/ConfigLogRotation/10-config.sh] : Completed activity. Result:
  Disabled forced hourly log rotation.
[2017-08-19T08:53:39.112Z] INFO  [2425]  - [Application update app-9fe7-170819_085316@6/AddonsAfter/ConfigLogRotation] : Completed activity. Result:
  Successfully execute hooks in directory /opt/elasticbeanstalk/addons/logpublish/hooks/config.
[2017-08-19T08:53:39.112Z] INFO  [2425]  - [Application update app-9fe7-170819_085316@6/AddonsAfter] : Completed activity.
[2017-08-19T08:53:39.112Z] INFO  [2425]  - [Application update app-9fe7-170819_085316@6] : Completed activity. Result:
  Application update - Command CMD-AppDeploy succeeded
[2017-08-19T09:04:10.467Z] INFO  [3375]  - [CMD-TailLogs] : Starting activity...
[2017-08-19T09:04:10.467Z] INFO  [3375]  - [CMD-TailLogs/AddonsBefore] : Starting activity...
[2017-08-19T09:04:10.467Z] INFO  [3375]  - [CMD-TailLogs/AddonsBefore] : Completed activity.
[2017-08-19T09:04:10.467Z] INFO  [3375]  - [CMD-TailLogs/TailLogs] : Starting activity...
[2017-08-19T09:04:10.468Z] INFO  [3375]  - [CMD-TailLogs/TailLogs/TailLogs] : Starting activity...



-------------------------------------
/var/log/eb-commandprocessor.log
-------------------------------------
[2017-08-19T08:41:13.404Z] INFO  [1450]  : Executing command CMD-AppDeploy activities...
[2017-08-19T08:41:13.404Z] DEBUG [1450]  : Setting environment variables..
[2017-08-19T08:41:13.404Z] INFO  [1450]  : Running AddonsBefore for command CMD-AppDeploy...
[2017-08-19T08:41:13.522Z] DEBUG [1450]  : Running stages of Command CMD-AppDeploy from stage 0 to stage 1...
[2017-08-19T08:41:13.522Z] INFO  [1450]  : Running stage 0 of command CMD-AppDeploy...
[2017-08-19T08:41:13.522Z] INFO  [1450]  : Running leader election...
[2017-08-19T08:41:13.770Z] INFO  [1450]  : Instance is Leader.
[2017-08-19T08:41:13.771Z] DEBUG [1450]  : Loaded 6 actions for stage 0.
[2017-08-19T08:41:13.771Z] INFO  [1450]  : Running 1 of 6 actions: InfraWriteConfig...
[2017-08-19T08:41:13.773Z] INFO  [1450]  : Running 2 of 6 actions: DownloadSourceBundle...
[2017-08-19T08:41:14.397Z] INFO  [1450]  : Running 3 of 6 actions: EbExtensionPreBuild...
[2017-08-19T08:41:14.674Z] INFO  [1450]  : Running 4 of 6 actions: AppDeployPreHook...
[2017-08-19T08:41:34.264Z] INFO  [1450]  : Running 5 of 6 actions: EbExtensionPostBuild...
[2017-08-19T08:41:34.776Z] INFO  [1450]  : Running 6 of 6 actions: InfraCleanEbextension...
[2017-08-19T08:41:34.801Z] INFO  [1450]  : Running stage 1 of command CMD-AppDeploy...
[2017-08-19T08:41:34.802Z] DEBUG [1450]  : Loaded 2 actions for stage 1.
[2017-08-19T08:41:34.802Z] INFO  [1450]  : Running 1 of 2 actions: AppDeployEnactHook...
[2017-08-19T08:41:35.075Z] INFO  [1450]  : Running 2 of 2 actions: AppDeployPostHook...
[2017-08-19T08:41:35.285Z] INFO  [1450]  : Running AddonsAfter for command CMD-AppDeploy...
[2017-08-19T08:41:35.374Z] INFO  [1450]  : Command CMD-AppDeploy succeeded!
[2017-08-19T08:41:35.374Z] INFO  [1450]  : Command processor returning results: 
{"status":"SUCCESS","api_version":"1.0","results":[{"status":"SUCCESS","msg":"","returncode":0,"events":[]}]}
[2017-08-19T08:53:22.612Z] DEBUG [2425]  : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties
[2017-08-19T08:53:22.612Z] DEBUG [2425]  : Checking if the command processor should execute...
[2017-08-19T08:53:22.614Z] DEBUG [2425]  : Checking whether the command is applicable to instance (i-06b93f5de9290cc97)..
[2017-08-19T08:53:22.614Z] INFO  [2425]  : Command is applicable to this instance (i-06b93f5de9290cc97)..
[2017-08-19T08:53:22.614Z] DEBUG [2425]  : Checking if the received command stage is valid..
[2017-08-19T08:53:22.614Z] INFO  [2425]  : No stage_num in command. Valid stage..
[2017-08-19T08:53:22.614Z] INFO  [2425]  : Received command CMD-AppDeploy: {"execution_data":"{\"leader_election\":\"true\"}","instance_ids":["i-06b93f5de9290cc97"],"data":"manifest_1503132800262","command_name":"CMD-AppDeploy","api_version":"1.0","resource_name":"AWSEBAutoScalingGroup","request_id":"d7d5c0a7-84bb-11e7-bba3-1b01bf08a2e3"}
[2017-08-19T08:53:22.614Z] INFO  [2425]  : Command processor should execute command.
[2017-08-19T08:53:22.614Z] DEBUG [2425]  : Storing current stage..
[2017-08-19T08:53:22.614Z] DEBUG [2425]  : Stage_num does not exist. Not saving null stage. Returning..
[2017-08-19T08:53:22.614Z] DEBUG [2425]  : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties
[2017-08-19T08:53:22.614Z] DEBUG [2425]  : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_ContainerConfigFileContent||commands..
[2017-08-19T08:53:22.616Z] DEBUG [2425]  : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_API||_Commands..
[2017-08-19T08:53:22.616Z] INFO  [2425]  : Found enabled addons: ["logstreaming", "logpublish"].
[2017-08-19T08:53:22.618Z] INFO  [2425]  : Updating Command definition of addon logstreaming.
[2017-08-19T08:53:22.618Z] INFO  [2425]  : Updating Command definition of addon logpublish.
[2017-08-19T08:53:22.618Z] DEBUG [2425]  : Refreshing metadata...
[2017-08-19T08:53:22.881Z] DEBUG [2425]  : Refreshed environment metadata.
[2017-08-19T08:53:22.881Z] DEBUG [2425]  : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_ContainerConfigFileContent||commands..
[2017-08-19T08:53:22.882Z] DEBUG [2425]  : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_API||_Commands..
[2017-08-19T08:53:22.882Z] INFO  [2425]  : Found enabled addons: ["logstreaming", "logpublish"].
[2017-08-19T08:53:22.884Z] INFO  [2425]  : Updating Command definition of addon logstreaming.
[2017-08-19T08:53:22.884Z] INFO  [2425]  : Updating Command definition of addon logpublish.
[2017-08-19T08:53:22.884Z] DEBUG [2425]  : Retrieving metadata for key: AWS::CloudFormation::Init||Infra-WriteApplication2||files..
[2017-08-19T08:53:22.885Z] DEBUG [2425]  : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||ManifestFileS3Key..
[2017-08-19T08:53:23.052Z] INFO  [2425]  : Loading manifest from bucket 'elasticbeanstalk-eu-west-2-395260458639' using computed S3 key 'resources/environments/e-mefmdqhgdn/_runtime/versions/manifest_1503132800262'.
[2017-08-19T08:53:23.208Z] INFO  [2425]  : Updated manifest cache: deployment ID 6 and serial 6.
[2017-08-19T08:53:23.208Z] DEBUG [2425]  : Loaded definition of Command CMD-AppDeploy.
[2017-08-19T08:53:23.209Z] INFO  [2425]  : Executing Application update
[2017-08-19T08:53:23.209Z] INFO  [2425]  : Executing command: CMD-AppDeploy...
[2017-08-19T08:53:23.209Z] INFO  [2425]  : Executing command CMD-AppDeploy activities...
[2017-08-19T08:53:23.209Z] DEBUG [2425]  : Setting environment variables..
[2017-08-19T08:53:23.209Z] INFO  [2425]  : Running AddonsBefore for command CMD-AppDeploy...
[2017-08-19T08:53:23.345Z] DEBUG [2425]  : Running stages of Command CMD-AppDeploy from stage 0 to stage 1...
[2017-08-19T08:53:23.345Z] INFO  [2425]  : Running stage 0 of command CMD-AppDeploy...
[2017-08-19T08:53:23.345Z] INFO  [2425]  : Running leader election...
[2017-08-19T08:53:23.609Z] INFO  [2425]  : Instance is Leader.
[2017-08-19T08:53:23.609Z] DEBUG [2425]  : Loaded 6 actions for stage 0.
[2017-08-19T08:53:23.609Z] INFO  [2425]  : Running 1 of 6 actions: InfraWriteConfig...
[2017-08-19T08:53:23.613Z] INFO  [2425]  : Running 2 of 6 actions: DownloadSourceBundle...
[2017-08-19T08:53:24.046Z] INFO  [2425]  : Running 3 of 6 actions: EbExtensionPreBuild...
[2017-08-19T08:53:24.330Z] INFO  [2425]  : Running 4 of 6 actions: AppDeployPreHook...
[2017-08-19T08:53:38.185Z] INFO  [2425]  : Running 5 of 6 actions: EbExtensionPostBuild...
[2017-08-19T08:53:38.472Z] INFO  [2425]  : Running 6 of 6 actions: InfraCleanEbextension...
[2017-08-19T08:53:38.497Z] INFO  [2425]  : Running stage 1 of command CMD-AppDeploy...
[2017-08-19T08:53:38.497Z] DEBUG [2425]  : Loaded 2 actions for stage 1.
[2017-08-19T08:53:38.497Z] INFO  [2425]  : Running 1 of 2 actions: AppDeployEnactHook...
[2017-08-19T08:53:38.779Z] INFO  [2425]  : Running 2 of 2 actions: AppDeployPostHook...
[2017-08-19T08:53:39.020Z] INFO  [2425]  : Running AddonsAfter for command CMD-AppDeploy...
[2017-08-19T08:53:39.112Z] INFO  [2425]  : Command CMD-AppDeploy succeeded!
[2017-08-19T08:53:39.112Z] INFO  [2425]  : Command processor returning results: 
{"status":"SUCCESS","api_version":"1.0","results":[{"status":"SUCCESS","msg":"","returncode":0,"events":[]}]}
[2017-08-19T09:04:10.462Z] DEBUG [3375]  : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties
[2017-08-19T09:04:10.462Z] DEBUG [3375]  : Checking if the command processor should execute...
[2017-08-19T09:04:10.464Z] DEBUG [3375]  : Checking whether the command is applicable to instance (i-06b93f5de9290cc97)..
[2017-08-19T09:04:10.464Z] INFO  [3375]  : Command is applicable to this instance (i-06b93f5de9290cc97)..
[2017-08-19T09:04:10.464Z] DEBUG [3375]  : Checking if the received command stage is valid..
[2017-08-19T09:04:10.464Z] INFO  [3375]  : No stage_num in command. Valid stage..
[2017-08-19T09:04:10.464Z] INFO  [3375]  : Received command CMD-TailLogs: {"execution_data":"{\"aws_access_key_id\":\"ASIAIA2VQ62PMCRDFV6A\",\"signature\":\"MCEmNlP\\\/xBc1GizP6ZgnkiD4RY0=\",\"security_token\":\"FQoDYXdzEIr\\\/\\\/\\\/\\\/\\\/\\\/\\\/\\\/\\\/\\\/wEaDHl+0fJgIP8p6HSBsSLcAxhKcQl7hj0SAcNJfz0svIHT3yZIGJY0udzaMIjpB\\\/EyHFVE85aOu\\\/\\\/g4+TC8jF2ohlJomHC1kwnoLWYN5itvPqJ8gB\\\/9M381IslJmfVM1MBmhSo2JpM+ZrO+lvoijWfRzD0OOYAFAOoUvvbTAmD9eBrvgB2VWHbDa1iBfhDrZiOfjgXseVSENuj1xYjdEtnG\\\/sjXGkABvX7WYoVYiOKMJy5MyQcz94bYlZnC0AJXEoaE1szPD\\\/DsSg6VkSaxixl\\\/JyV51YQEQ1xMUTMH+YxVV5jgDdjj4eyaib8FZdhpxp9i8sNxIW0zX3CE\\\/+vtVbA3hk183\\\/TNicEHlLOziVa41hCytOGHXmJ2n0MoQnX62tXvN2y4bDAosfIznHCC1TPdJpMUnwFEibpryVKsRFXYs0\\\/ZAeKQfzv0VOIY6mJhEcl14kopqaab4oDs7L53IHZBux\\\/Xxy7X633yw5fXaR7SeK5exfd+QWPJaYPqyJYnK+NeRaJ+EfDbt\\\/lhLbDsGbR3lyjVglcExcu2sS1dNw5oPaTGpaKH1j1sOI7pNG\\\/vxs6l6Klk3G9lecINiJtCz2DTllox80S1167hXzKH1kn8XDhupgE8wNs7TKnQHQSEAwi8NsJFAPAsdokfT2+KMvq38wF\",\"policy\":\"eyJleHBpcmF0aW9uIjoiMjAxNy0wOC0xOVQwOTozNDowOS40NFoiLCJjb25kaXRpb25zIjpbWyJzdGFydHMtd2l0aCIsIiR4LWFtei1tZXRhLXRpbWVfc3RhbXAiLCIiXSxbInN0YXJ0cy13aXRoIiwiJHgtYW16LW1ldGEtcHVibGlzaF9tZWNoYW5pc20iLCIiXSxbInN0YXJ0cy13aXRoIiwiJGtleSIsInJlc291cmNlc1wvZW52aXJvbm1lbnRzXC9sb2dzXC8iXSxbInN0YXJ0cy13aXRoIiwiJHgtYW16LW1ldGEtYmF0Y2hfaWQiLCIiXSxbInN0YXJ0cy13aXRoIiwiJHgtYW16LW1ldGEtZmlsZV9uYW1lIiwiIl0sWyJzdGFydHMtd2l0aCIsIiR4LWFtei1zZWN1cml0eS10b2tlbiIsIiJdLFsic3RhcnRzLXdpdGgiLCIkQ29udGVudC1UeXBlIiwiIl0sWyJlcSIsIiRidWNrZXQiLCJlbGFzdGljYmVhbnN0YWxrLWV1LXdlc3QtMi0zOTUyNjA0NTg2MzkiXSxbImVxIiwiJGFjbCIsInByaXZhdGUiXV19\"}","instance_ids":["i-06b93f5de9290cc97"],"data":"5c412da4-84bd-11e7-8e21-1dd123c4f782","command_name":"CMD-TailLogs","api_version":"1.0","resource_name":"AWSEBAutoScalingGroup","request_id":"5c412da4-84bd-11e7-8e21-1dd123c4f782"}
[2017-08-19T09:04:10.464Z] INFO  [3375]  : Command processor should execute command.
[2017-08-19T09:04:10.464Z] DEBUG [3375]  : Storing current stage..
[2017-08-19T09:04:10.464Z] DEBUG [3375]  : Stage_num does not exist. Not saving null stage. Returning..
[2017-08-19T09:04:10.464Z] DEBUG [3375]  : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties
[2017-08-19T09:04:10.464Z] DEBUG [3375]  : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_ContainerConfigFileContent||commands..
[2017-08-19T09:04:10.465Z] DEBUG [3375]  : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_API||_Commands..
[2017-08-19T09:04:10.465Z] INFO  [3375]  : Found enabled addons: ["logstreaming", "logpublish"].
[2017-08-19T09:04:10.467Z] INFO  [3375]  : Updating Command definition of addon logstreaming.
[2017-08-19T09:04:10.467Z] INFO  [3375]  : Updating Command definition of addon logpublish.
[2017-08-19T09:04:10.467Z] DEBUG [3375]  : Loaded definition of Command CMD-TailLogs.
[2017-08-19T09:04:10.467Z] INFO  [3375]  : Executing CMD-TailLogs
[2017-08-19T09:04:10.467Z] INFO  [3375]  : Executing command: CMD-TailLogs...
[2017-08-19T09:04:10.467Z] INFO  [3375]  : Executing command CMD-TailLogs activities...
[2017-08-19T09:04:10.467Z] DEBUG [3375]  : Setting environment variables..
[2017-08-19T09:04:10.467Z] INFO  [3375]  : Running AddonsBefore for command CMD-TailLogs...
[2017-08-19T09:04:10.467Z] DEBUG [3375]  : Running stages of Command CMD-TailLogs from stage 0 to stage 0...
[2017-08-19T09:04:10.467Z] INFO  [3375]  : Running stage 0 of command CMD-TailLogs...
[2017-08-19T09:04:10.467Z] DEBUG [3375]  : Loaded 1 actions for stage 0.
[2017-08-19T09:04:10.467Z] INFO  [3375]  : Running 1 of 1 actions: TailLogs...
EN

回答 3

Stack Overflow用户

发布于 2018-12-11 11:16:29

如果您发送您的项目文件夹拉链,也许,在配置上,您必须使用/yourProjectFolderName/public而不是/public

票数 1
EN

Stack Overflow用户

发布于 2019-09-06 21:38:13

这是一个迟来的答案,但也许人们将来会发现它是有帮助的。当您将Laravel应用程序部署到ElasticBean秸秆时,必须将后者配置为将根设置为/public,因为Laravel中的index.php驻留在public文件夹中,而不是项目根。在您的情况下,如果您访问您的网站,并添加/public后的网址,它将工作。

只需转到您的EB环境并单击Configuration,然后转到Security并在应用程序根字段中放置/public

票数 0
EN

Stack Overflow用户

发布于 2022-02-16 11:48:35

正如@Amine所说,您需要将webroot设置为/public。

如果您不希望通过控制台执行此操作,而是在代码中创建一个文件:

.ebextensions/01-settings.config

有以下内容:

代码语言:javascript
复制
option_settings:
  aws:elasticbeanstalk:container:php:phpini:
    document_root: /public
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/45769395

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档