我想让 ngrok 在我的本地服务器上使用 php 脚本,但是在加载一些之后我得到一个 502 错误:
502 Bad Gateway 服务器返回无效或不完整的响应。
我已经完成了以下操作 - 在我的 /etc/hosts 中有一行
127.0.0.1 test.dev
此外,为该本地域启用了一个虚拟主机:
cat /etc/apache2/sites-enabled/test.conf
<VirtualHost *:80>
ServerName test.dev
DocumentRoot /var/www/test
ErrorLog ${APACHE_LOG_DIR}/error-test.log
CustomLog ${APACHE_LOG_DIR}/access-test.log combined
</VirtualHost>
当我在运行的 /var/www/test 目录中只放一个 index.html 文件时
ngrok http -host-header=rewrite test.dev:80
完美运行!
但是,如果我将 index.html 重命名为 index.php,我会在上面收到此加载错误。
我在 Ubuntu 14.04 上使用 ngrok 版本 2.0.25。
我究竟做错了什么?