zoukankan      html  css  js  c++  java
  • nginx 使用安装问题及解决方案

       如何安装清参考:http://www.runoob.com/linux/nginx-install-setup.html

     可以先不用配置,等理解后在配置。

                       在启动nginx时,出现提示:

    nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
    nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
    nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
    nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
    nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
    nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
    nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
    nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
    nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
    nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
    nginx: [emerg] still could not bind()

    原因是因为80 端口已被其他的程式占用,所以需要kill掉其他的进程。

     使用命令:  fuser -n tcp 80  查看;

    然后使用 kill -9  [进程名] ...

    然后出新输nginx 启动命令。

    在浏览器上使用localhost 打开,会出现提示:

     

    Welcome to nginx!

    If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

    For online documentation and support please refer to nginx.org.
    Commercial support is available at nginx.com.

    Thank you for using nginx.

    那么恭喜你启动成功哦哦。

    注意还没有进行配置,这只是默认的配置。

  • 相关阅读:
    Linux的文本编辑和文本内容查看命令
    服务器日志查看处理(一)
    MAC 系统java开发环境搭建教程
    git撤销已经push到远端的commit
    Centos7 编译安装 Libmcrypt 库
    curl和wget的区别和使用
    docker 安装vim和yum命令
    docker安装GD扩展
    【docker】为docker下的php容器安装php-redis扩展【编译安装】
    mysql大表优化方案
  • 原文地址:https://www.cnblogs.com/fandong90/p/5365980.html
Copyright © 2011-2022 走看看