windows下nginx启动一闪而过(原因以及查看和解决的办法)

解决问题的思路清晰比确切解决的办法更加有效

原因:

这是80端口被占用的缘故,修改下端口即可

 

得出此原因的方法:

运行“nginx.exe”文件即可,运行后,界面一闪而过。

这是查看log日志,就能得到原因

 

2018/08/23 21:43:34 [emerg] 16612#13696: bind() to 0.0.0.0:80 failed (10013: An attempt was made to access a socket in a way forbidden by its access permissions)

80:端口被占用

具体的解决办法:

解决的方法有很多种,但是不建议使用修改注册表,因为不懂注册表东西 怕改坏

以下修改配置文件,修改成如下

目录:文件conf/nginx.conf

    server {

        listen       8888;

        server_name  localhost;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        location / {

            root   html;

            index  index.html index.htm;

        }

这时候再点击nginx,这时候会出现是否出现安全提示,然后在浏览器中输入127.0.0.1:8888

同理输入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 tonginx.org.

Commercial support is available atnginx.com.

Thank you for using nginx.

参考http://www.360doc.com/content/12/0615/23/15643_218433480.shtml

Measure

Measure

 

  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 4
    评论
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值