我已经在我的本地计算机上使用ReactPHP工作REST API,我想将其部署在开发服务器上,
我在DO上添加了一个新闻数据库域,与nginx进行了讨论,设置了一个正在进行的php索引进程.php我的服务器根文件为ReactPHP应用程序。
已允许端口 8000。
现在我无法访问我的api路由我的服务器日志显示为默认回显Listening on tls://127.0.0.1:8000$loop->run();
在击中子域的路线上,它说
<html>
<head>
<title>502 Bad Gateway</title>
</head>
<body bgcolor="white">
<center>
<h1>502 Bad Gateway</h1>
</center>
<hr>
<center>nginx/1.14.0 (Ubuntu)</center>
</body>
</html>
我的恩金克斯会议
server {
listen 80;
server_name test.example.com;
root /var/www/api;
index index.php index.html index.htm index.nginx-debian.html;
location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header Host $host;
proxy_read_timeout 60;
proxy_connect_timeout 60;
proxy_redirect off;
# Allow the use of websockets
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
listen 443 ssl http2;
#ssl info removed
}
慕桂英3389331
相关分类