In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
Today, I would like to share with you how to solve the problem that port 80 of windows is occupied and nginx cannot be started. The content is detailed and the logic is clear. I believe most people still know too much about this, so share this article for your reference. I hope you can get something after reading this article. Let's take a look at it.
1. Installation
Download the latest version used under windows, which is currently 1.11.10, as shown in the figure:
Just download it and decompress it.
2. Run
Run nginx and report an error:
[emerg] 10348: 10940: bind () to 0.0.0.0 failed 80 failed (10013: an attempt was made to access a socket in a way forbidden by its access permissions)
As shown in the figure:
You can also see it in the log log, open:
Nginx-1.11.10\ logs\ error.log
As shown in the figure:
Nginx uses port 80 by default, but port 80 under windows is occupied. Check:
Occupied by a process with a pid of 4, check:
It's a system process, take a look in the task manager:
Sure enough.
3. Problem solving
The solution is to make the system process no longer occupy port 80 and need to modify the registry.
3.1 Open the registry
Enter regedit in the launch bar
3.2 find the registration key and modify it
find
Hkey_local_machine\ system\ currentcontrolset\ services\ http
There is an entry of type reg_dword start registry key:
The original value is 3:
Change to 0:
3.3 restart the operating system
Restart the windows system, and the original system process will not occupy port 80.
4. Rerun nginx
Run under the installation directory of nginx:
Start nginx.exe
Or:
Nginx.exe
As shown in the figure:
In the task manager, you can see that two processes will be started in the background:
5. Close nginx
Nginx.exe-s stop
Or:
Nginx.exe-s quit
Stop can quickly stop nginx, but may not save the relevant information; while quit stops the nginx in a complete and orderly manner, the process saves the relevant information.
These are all the contents of this article "how to solve the problem that nginx cannot be started when port 80 is occupied under windows". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.