google-app-engine - How to run Google App Engine WordPress blog locally
问题描述
Following the Wordpress on GAE tutorial, I have managed to successfully deploy my blog to App Engine. However, I would like to be able to run my blog locally as I continue its development, so that I can inspect error logs, etc. Using the GAE dev server, I try to run it like so:
dev_appserver.py --log_level=debug app.yaml --php_executable_path=/usr/local/bin/php
But I run into this problem:
The url "/" does not match any handlers.
I have not changed my app.yaml nor any other file (the ones auto-created by the wp-gae.php step in the tutorial). It looks like this:
How to Run Wordpress Blog on Google App Engine Locally
dev_appserver.py --log_level=debug app.yaml --php_executable_path=/usr/local/bin/php
the blog should run on my local setup
解决方案
根据这个论坛链接,您需要指定 php-cgi 可执行文件。
export CLOUDSDK_PYTHON=$(which python2) && dev_appserver.py --support_datastore_emulator=False --log_level=debug --php_executable_path=$(which php-cgi) app.yaml
我还必须向 app.yaml 添加一个处理程序以使站点正常工作,确保它是最后一个处理程序(最低优先级)
- url: .*
script: gae-app.php
推荐阅读
- python - 从 matlab 移植到 python 的遗传算法似乎没有进化
- java - 尝试在 Android Studio 中的空对象引用上调用接口方法“java.lang.Object java.util.List.get(int)”
- python - 我必须创建嵌套循环还是可以使用 try 函数来创建?
- php - 如何将(合并的)下拉菜单值发送到数据库?
- javascript - JavaScript 中的对象创建和新对象
- css - 材质选择边框的颜色如何改变?
- android - 将日志写入流内的文件并在协程内收集
- python - 为什么这个 DataFrame 没有做我想做的事情?
- python-3.x - 将图像转换为图标会出错
- r - 基于多列值的复杂 case_when() 语句 (dplyr)