简体   繁体   English

如何让 Supervisor 在与默认 6001 不同的端口上运行?

[英]How can I make Supervisor run on a different port than the default 6001?

I have a laravel project and I am using Laravel-Websockets which run under the port 6001. However, I'm installing Supervisor to help run commands automatically, but the Supervisor is running on the same 6001 port and I get Failed to listen on "tcp://0.0.0.0:6001": Address already in use (EADDRINUSE)我有一个 laravel 项目,我正在使用在 6001 端口下运行的 Laravel-Websockets。但是,我正在安装 Supervisor 以帮助自动运行命令,但 Supervisor 正在同一个 6001 端口上运行,我Failed to listen on "tcp://0.0.0.0:6001": Address already in use (EADDRINUSE)

Is there any way to change the Supervisor and make it run under another port?有什么办法可以改变主管并使其在另一个端口下运行? Thank you in advance.先感谢您。

Okay, so here am I with an answer after a few hours of research.好的,经过几个小时的研究,我得到了答案。

Actually, the problem depends whether you use a Control Panel for your server.实际上,问题取决于您是否为您的服务器使用控制面板。 This is important because all default paths are replaced in case you use one (such as domain_name can be under /www/wwwroot/domain_name or PHP directory can be in another PATH managed by the Control Panel)这很重要,因为如果您使用默认路径,所有默认路径都会被替换(例如 domain_name 可以在 /www/wwwroot/domain_name 下或 PHP 目录可以在控制面板管理的另一个 PATH 中)

Mine is AAA panel, so I was loading the wrong PHP on my program, and I had to put the real actual path of the PHP instead of /usr/bin/php我的是 AAA 面板,所以我在我的程序中加载了错误的 PHP,我不得不输入 PHP 的真实路径而不是/usr/bin/php

Consider cleaning the entire cache on laravel before running the supervisorctl again.考虑在再次运行 supervisorctl 之前清理 laravel 上的整个缓存。 (sudo php artisan ptimize:clear) (须藤 php 工匠优化:清除)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM