• 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.

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

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

  • 相关阅读:
    RequireJS的简单应用
    关于浏览器兼容处理—— 识别IE浏览器
    Div+CSS命名规范
    用CSS开启硬件加速来提高网站性能(转)
    5步解决移动设备上的300ms点击延迟
    全面理解BFC
    纯CSS画的基本图形(矩形、圆形、三角形、多边形、爱心、八卦等)
    Less和Sass编译
    Linux初级知识_03 -- 系统基础命令
    Linux初级知识_02 -- 基础命令
  • 原文地址:https://www.cnblogs.com/fandong90/p/5365980.html
Copyright © 2020-2023  润新知