开发者社区> 问答> 正文

nginx的配置问题:报错

今天第一次用nginx,apt-get安装的,打开nginx.config,里面是这样的

#mail {
#       # See sample authentication script at:
#       # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
#
#       # auth_http localhost/auth.php;
#       # pop3_capabilities "TOP" "USER";
#       # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
#       server {
#               listen     localhost:110;
#               protocol   pop3;
#               proxy      on;
#       }
#
#       server {
#               listen     localhost:143;
#               protocol   imap;
#               proxy      on;
#       }

跟那些网上说的不一样啊,这什么情况?怎么设置

开始是nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)

在http里面加了server {
       listen 9000;
,于是nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:9000 failed (98: Address already in use)
,请这方面熟悉的朋友帮看看

展开
收起
kun坤 2020-06-07 08:04:21 414 0
1 条回答
写回答
取消 提交回答
  • 这个出错提示也看不懂?######Address already in use######就是说你80端口上已经运行了一个程序了我猜么可能是apache,具体是什么程序,你可以用 lsof -i:80 命令查看

    2020-06-07 08:04:27
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
《Nginx 代理系统常用手册》 立即下载
CentOS Nginx PHP JAVA 多语言镜像使用手 立即下载
CentOS Nginx PHP JAVA多语言镜像使用手册 立即下载