【发布时间】:2016-07-21 14:57:56
【问题描述】:
我正在尝试让这个存储库在 OSX 10.11.1 (Capitan) 上本地运行
https://github.com/heroku/php-getting-started.git
使用以下命令
$ sudo heroku local web
但我只到此为止
[OKAY] Loaded ENV .env File as KEY=VALUE Format
[OKAY] Trimming display Output to 151 Columns
17:30:30 web.1 | DOCUMENT_ROOT changed to 'web/'
17:30:30 web.1 | 4 processes at 128MB memory limit.
17:30:30 web.1 | Starting php-fpm...
17:30:32 web.1 | Starting httpd...
17:30:32 web.1 | Application ready for connections on port 8080.
17:30:32 web.1 | (13)Permission denied: AH00072: make_sock: could not bind to address [::]:80
17:30:32 web.1 | (13)Permission denied: AH00072: make_sock: could not bind to address 0.0.0.0:80
17:30:32 web.1 | no listening sockets available, shutting down
17:30:32 web.1 | AH00015: Unable to open logs
17:30:32 web.1 | Process exited unexpectedly: httpd
17:30:32 web.1 | Going down, terminating child processes...
[DONE] Killing all processes with signal null
17:30:32 web.1 Exited Abnormally
有什么想法会导致设置 :80 时出现权限被拒绝错误,即使我 sudo 也是如此?或者为什么 heroku local 仍然尝试使用端口 80?
部署到 heroku 后一切正常。
这是完整的教程: https://devcenter.heroku.com/articles/getting-started-with-php
编辑
当我尝试使用
手动设置端口时$ heroku local web -p 5000
它只是将默认的 8080 更改为 5000 ...
[OKAY] Loaded ENV .env File as KEY=VALUE Format
[OKAY] Trimming display Output to 151 Columns
08:06:33 web.1 | DOCUMENT_ROOT changed to 'web/'
08:06:33 web.1 | 4 processes at 128MB memory limit.
08:06:33 web.1 | Starting php-fpm...
08:06:35 web.1 | Starting httpd...
08:06:35 web.1 | Application ready for connections on port 5000.
08:06:35 web.1 | (13)Permission denied: AH00072: make_sock: could not bind to address [::]:80
08:06:35 web.1 | (13)Permission denied: AH00072: make_sock: could not bind to address 0.0.0.0:80
08:06:35 web.1 | no listening sockets available, shutting down
08:06:35 web.1 | AH00015: Unable to open logs
08:06:35 web.1 | Process exited unexpectedly: httpd
08:06:35 web.1 | Going down, terminating child processes...
[DONE] Killing all processes with signal null
08:06:35 web.1 Exited Abnormally
【问题讨论】: