【发布时间】:2021-02-16 17:57:26
【问题描述】:
我刚刚部署了一个 App Engine 应用程序,其中 phpMyAdmin 连接到 Cloud SQL 数据库。 当我使用它时,一切正常。
我想将此应用程序分享给我的学生,但我不知道如何让他们访问 https 资源。 https://-dot-.ue.r.appspot.com/index.php 我尝试了以下方法:
禁用 IAP :学生看到“您的客户端无权获取 URL /”
使用 allUsers 启用 IAP:查看者:学生会看到一个页面,其中显示“您没有权限..联系管理员”
使用“allAuthenticated User Viewer”启用 IAP:同样的错误
使用“IAP-secured Web App User”角色启用 IAP:同样的错误
我真的对授予访问权限感到迷茫。我认为默认情况下我的 App Engine 可供所有 google 用户使用?
我在这里错过了什么?
谢谢!
App.yaml:
service: phpmyadmin
runtime: php55
api_version: 1
handlers:
- url: /(.+\.(ico|jpg|png|gif))$
static_files: \1
upload: (.+\.(ico|jpg|png|gif))$
application_readable: true
- url: /(.+\.(htm|html|css|js))$
static_files: \1
upload: (.+\.(htm|html|css|js))$
application_readable: true
- url: /(.+\.php)$
script: \1
login: admin
- url: /.*
script: index.php
login: admin
config.inc.php:
<?php
$cfg['blowfish_secret'] = '<my-secret>'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
/*
* Servers configuration
*/
$i = 0;
// Change this to use the project and instance that you've created.
$host = '/cloudsql/<my-app>:europe-west1:<my-db>';
$type = 'socket';
/*
* First server
*/
$i++;
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
$cfg['Servers'][$i]['socket'] = $host;
$cfg['Servers'][$i]['connect_type'] = $type;
$cfg['Servers'][$i]['compress'] = false;
/* Select mysql if your server does not have mysqli */
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
/*
* End of servers configuration
*/
$cfg['TempDir'] = "/tmp/";
/*
* Directories for saving/loading files from server
*/
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';
/*
* Other settings
*/
$cfg['PmaNoRelation_DisableWarning'] = true;
$cfg['ExecTimeLimit'] = 60;
$cfg['CheckConfigurationPermissions'] = false;
【问题讨论】:
-
嗨 Damien,您能分享您的 yaml 和 config.inc.php 文件吗?这有助于查看您的配置并查看那里是否有问题。
-
完成!我添加了配置文件
标签: google-app-engine google-cloud-platform