在下载了nginx后,cmd下运行nginx.exe文件时,出现错误nginx: [emerg] 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端口被占用,只需要找到nginx 的配置文件conf文件,打开nginx.conf,把里面的
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root html;
index index.html index.htm;
}
listen 80 ;改成没有占用的端口就可以了,然后cmd下运行nginx.exe文件,重启。
本文介绍了解决nginx启动时因80端口被占用而产生的错误的方法。通过更改nginx.conf配置文件中的监听端口来避免冲突,并成功运行nginx。

6469

被折叠的 条评论
为什么被折叠?



