就是在做php项目的时候,自己本地有多个web项目,对应也是配置了nginx的配置,比如A项目: server { listen 80; server_name www.aa.com; root /WWW/api-aa; index index.html index.htm index.php; location / { try_files $uri $uri/ /index.php?$query_string; } location = /favicon.ico { log_not_found off; } location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } } 项目B配置如下: server { listen 80; server_name www.bb.com; root /WWW/api-bb; index index.html index.htm index.php; location / { try_files $uri $uri/ /index.php?$query_string; } location = /favicon.ico { log_not_found off; } location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } } 就是上面2个项目都是80端口,也都是正常运行,那为什么2个项目都使用80端口但是不算端口冲突呢?