I want to install nginx and let it use port 80, thank you!
sudo apachectl stopClose the apache server
lsof -i:80
Then kill 掉 Apache 任务对应的 pid
kill
pid
If lsof 输出太多,试试在后面加上 | grep -i 'apache'
lsof
| grep -i 'apache'
Guess, vi /etc/apache2/httpd.conf, modify listen 80 to listen 88.You don’t have to worry about restarting like this.
Look for the configuration file and modify port 80 of nginx or apache to another port.
sudo apachectl stop
Close the apache server
lsof -i:80
Then
kill
掉 Apache 任务对应的pid
If
lsof
输出太多,试试在后面加上| grep -i 'apache'
Guess, vi /etc/apache2/httpd.conf, modify listen 80 to listen 88.
You don’t have to worry about restarting like this.
Look for the configuration file and modify port 80 of nginx or apache to another port.