AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 1005302
Accepted
user3783243
user3783243
Asked: 2020-03-03 06:43:36 +0800 CST2020-03-03 06:43:36 +0800 CST 2020-03-03 06:43:36 +0800 CST

Lighttpd/Nginx 无功能

  • 772

我正在使用 AWS 的 Blackboard AMI,但无法让 lighttpd 在其上运行。我不断得到502。

我跑service lighttpd status了,这让我回来了:

● lighttpd.service - Lighttpd Daemon
   Loaded: loaded (/lib/systemd/system/lighttpd.service; disabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Mon 2020-03-02 09:33:49 EST; 4min 31s ago
  Process: 4770 ExecStart=/usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf (code=exited, status=255)
  Process: 4763 ExecStartPre=/usr/sbin/lighttpd -t -f /etc/lighttpd/lighttpd.conf (code=exited, status=0/SUCCESS)
 Main PID: 4770 (code=exited, status=255)

Mar 02 09:33:49 ip-172-31-27-103 systemd[1]: Stopped Lighttpd Daemon.
Mar 02 09:33:49 ip-172-31-27-103 systemd[1]: Starting Lighttpd Daemon...
Mar 02 09:33:49 ip-172-31-27-103 lighttpd[4763]: Syntax OK
Mar 02 09:33:49 ip-172-31-27-103 systemd[1]: Started Lighttpd Daemon.
Mar 02 09:33:49 ip-172-31-27-103 lighttpd[4770]: 2020-03-02 09:33:49: (network.c.409) can't bind to port:  443 Address already in use
Mar 02 09:33:49 ip-172-31-27-103 systemd[1]: lighttpd.service: Main process exited, code=exited, status=255/n/a
Mar 02 09:33:49 ip-172-31-27-103 systemd[1]: lighttpd.service: Unit entered failed state.
Mar 02 09:33:49 ip-172-31-27-103 systemd[1]: lighttpd.service: Failed with result 'exit-code'.

然后我跑去netstat -tulpn查看正在使用的内容443并返回:

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1134/sshd       
tcp        0      0 127.0.0.1:5432          0.0.0.0:*               LISTEN      1269/postgres   
tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      1895/nginx.conf 
tcp6       0      0 :::22                   :::*                    LISTEN      1134/sshd       
tcp6       0      0 :::9900                 :::*                    LISTEN      1963/node       
udp        0      0 0.0.0.0:68              0.0.0.0:*                           903/dhclient    
udp        0      0 172.31.27.103:123       0.0.0.0:*                           1230/ntpd       
udp        0      0 127.0.0.1:123           0.0.0.0:*                           1230/ntpd       
udp        0      0 0.0.0.0:123             0.0.0.0:*                           1230/ntpd       
udp6       0      0 fe80::cc5:7dff:fee9:123 :::*                                1230/ntpd       
udp6       0      0 ::1:123                 :::*                                1230/ntpd       
udp6       0      0 :::123                  :::*                                1230/ntpd       

然后我尝试了各种命令来查看它的状态,nginx但它们都返回它没有在我的机器上运行。

Failed to restart nginx.service: Unit nginx.service not found.
sudo: /usr/sbin/nginx: command not found

可以nginx在另一个服务下运行,或者我怎样才能让我的服务器正常运行?没有为 AMI 提供支持。

更新ps -efl|grep 1895 | grep -v "grep"返回:

4 S root      1895  1864  0  80   0 - 14857 sigsus 08:07 ?        00:00:00 nginx: master process /usr/local/openresty/bin/openresty -c /usr/local/etc/openresty/nginx.conf
5 S nobody    1911  1895  0  80   0 - 15113 ep_pol 08:07 ?        00:00:00 nginx: worker process
5 S nobody    1912  1895  0  80   0 - 15113 ep_pol 08:07 ?        00:00:00 nginx: worker process
nginx lighttpd 502-error amazon-ami
  • 1 1 个回答
  • 270 Views

1 个回答

  • Voted
  1. Best Answer
    Romeo Ninov
    2020-03-03T07:12:10+08:002020-03-03T07:12:10+08:00

    所以这个openresty监听端口是 443。它取决于你如何解决它。

    • 停止并移除openresty
    • 分配给openresty不同的端口(不要忘记重新启动它)
    • 分配不同的端口给lighttpd
    • 1

相关问题

  • Gzip 与反向代理缓存

  • nginx 作为代理的行为

  • Nginx 学习资源 [关闭]

  • 提供 70,000 个静态文件 (jpg) 的最佳方式?

  • 在 Apache、LightTPD 和 Nginx Web 服务器上提供 PHP 5.x 应用程序的现状?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve