As shown in the figure: Check port usage: View the process occupying the port: From the results, we can see that port 80 is occupied by Nginx itself. You can kill the process and restart Nginx. After successfully killing the process, start Nginx Start Nginx successfully. Enter the IP address of the system where Nginx is located in the browser to verify whether Nginx is started successfully. The following describes how to start, stop, and restart Nginx. start up Startup code format: nginx installation directory address -c nginx configuration file address For example: [root@LinuxServer sbin]# /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf stop There are three ways to stop nginx: Stop calmly 1. Check the process number [root@LinuxServer ~]# ps -ef|grep nginx 2. Kill the process [root@LinuxServer ~]# kill -QUIT 2072 Quick Stop 1. Check the process number [root@LinuxServer ~]# ps -ef|grep nginx 2. Kill the process [root@LinuxServer ~]# kill -TERM 2132 or [root@LinuxServer ~]# kill -INT 2132 Force Stop [root@LinuxServer ~]# pkill -9 nginx Restart 1. Verify whether the nginx configuration file is correct Method 1: Enter the nginx installation directory sbin and enter the command ./nginx -t The following shows that nginx.conf syntax is ok This indicates that the configuration file is correct! Method 2: Add -t before the startup command -c 2. Restart Nginx service Method 1: Enter the nginx executable directory sbin and enter the command ./nginx -s reload Method 2: Find the current nginx process number, and then enter the command: kill -HUP process number to restart the nginx service Summarize The above is what I introduced to you about the prompt that the port is occupied when starting Nginx: Address already in use. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: Implementation of vscode custom vue template
>>: MySql 5.6.35 winx64 installation detailed tutorial
Win2008 R2 zip format mysql installation and conf...
GitHub address, you can star it if you like it Pl...
There are two ways: 1. Service method Check the f...
Today we are going to make origami airplanes (the...
Unicode Signature BOM - What is the BOM? BOM is th...
Find the problem Today, when I tried to modify th...
Table of contents 1. What is copy_{to,from}_user(...
Many times, we ignore the setting of the web page ...
We simply need to open any text editor, copy the f...
Shell is a program written in C language, which i...
I usually use nginx as a reverse proxy for tomcat...
Table of contents Preface The role of render Rend...
1. Preparation After installing the Linux operati...
When you first start learning Linux, you first ne...
1. Install mysql5.6 docker run mysql:5.6 Wait unt...