小编Mat*_*tel的帖子

AWS - 负载均衡器上的SSL/https

我有一个问题是将https添加到我的ec2实例中,也许你们可以得到答案让它工作.

我有一个负载平衡器,它转发到我的EC2实例的连接,我已经将SSL证书添加到负载均衡器,一切都很顺利,我已经添加了一个侦听器到端口443,将转发到我的端口443实例,我已经在端口443和80上配置了apache,现在这里是我的负载均衡器的屏幕截图:

在此输入图像描述

SSL证书是有效的,在端口80(http)上一切正常,但如果我尝试使用https,则请求无法完成.

任何的想法?

干杯

ssl amazon-ec2 amazon-web-services

13
推荐指数
1
解决办法
1万
查看次数

Python Google Drive API - 列出整个驱动器文件树

我正在构建一个使用Google驱动器API的python应用程序,所以开发很好,但是我有一个问题需要检索整个Google驱动器文件树,我需要它有两个目的:

  1. 检查路径是否存在,所以如果我想在root/folder1/folder2下上传test.txt我想检查文件是否已经存在并在案例中更新它
  2. 构建一个可视化文件浏览器,现在我知道谷歌提供了他自己的(我现在不记得名字,但我知道存在)但我想将文件浏览器限制为特定的文件夹.

现在我有一个获取Gdrive根目录的函数,我可以通过递归调用一个函数来构建三个函数,这个函数列出了我单个文件夹的内容,但它非常慢并且可能会向Google发出数千个请求,这是不能接受的.

这里获取root的函数:

def drive_get_root():
"""Retrieve a root list of File resources.
Returns:
List of dictionaries.
"""

#build the service, the driveHelper module will take care of authentication and credential storage
drive_service = build('drive', 'v2', driveHelper.buildHttp())
# the result will be a list
result = []
page_token = None
while True:
    try:
        param = {}
        if page_token:
            param['pageToken'] = page_token
        files = drive_service.files().list(**param).execute()
        #add the files in the list
        result.extend(files['items'])
        page_token = files.get('nextPageToken')
        if not page_token:
            break
    except …
Run Code Online (Sandbox Code Playgroud)

python google-api google-drive-api

7
推荐指数
2
解决办法
9153
查看次数

reCAPTCHA 2.0挑战类型

有谁知道是否可以选择新的recaptcha将提示给用户的挑战类型?

例如,在专业外观的网站上,挑选"选择下面的牛排"与其中的牛排图像池并不是很好

我查看了文档,但没有这样的内容 https://developers.google.com/recaptcha/docs/display#config

任何的想法?

谢谢

recaptcha

5
推荐指数
0
解决办法
429
查看次数

PHP 实例类型中的 AWS Elasticbeanstalk 安装节点和 npm

我有一个使用 gulp 构建生产文件的 PHP 应用程序,我使用 elasticbeanstalk 将我的应用程序部署到 AWS EC2 实例,我想安装 node 和 npm 以在部署期间运行 gulp,我当前的配置是:

.ebextensions 文件夹中的 01-installPackages.config

commands:
  01updateComposer:
    command: export COMPOSER_HOME=/root && /usr/bin/composer.phar self-update
  02installNode:
    command:
      # run this command from /tmp directory
      cwd: /tmp
      # don't run the command if node is already installed (file /usr/bin/node exists)
      test: '[ ! -f /usr/bin/node ] && echo "node not installed"'
      # install from epel repository
      # flag -y for no-interaction installation
      command: 'sudo yum install -y nodejs --enablerepo=epel'
Run Code Online (Sandbox Code Playgroud)

节点命令失败,但如果我 …

amazon-web-services node.js npm amazon-elastic-beanstalk

5
推荐指数
1
解决办法
1904
查看次数