容器中的nginx暴露一个端口部署多个功能的网站_witton的博客-CSDN博客
windows下使用 nginx部署静态页面(两个静态项目文件)_nginx配置多页面_新征程,再出发的博客-CSDN博客
Windows系统如何在本地(localhost)配置Nginx支持多个网站?_localhost配置文件-CSDN博客
最终的整个nginx.conf配置文件内容如下
#user nobody;
worker_processes auto;
events {
worker_connections 1024;
multi_accept on;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile off;
tcp_nopush on;
client_max_body_size 200m;
#默认支持的站点
server {
listen 80 default_server;
server_name localhost;
root html;
location / {
#include wordpress.conf; #这里加载支持wordpress网站修改固定链接的配置
index index.php index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
#新添加的模拟域名站点1:siliconcircuit.asia
server {
listen 81;
server_name siliconcircuit.asia;
root D:/WNMP/Nginx/html/mulitiWordPress/siliconcircuit.asia/;
index index.php index.html index.htm;
location / {
allow all;
}
}
#新添加的模拟域名站点2:jianwangzhan.online
server {
listen 82;
server_name jianwangzhan.online;
root D:/WNMP/Nginx/html/mulitiWordPress/jianwangzhan.online/;
index index.php index.html index.htm;
location / {
allow all;
}
}
}
nginx 部署多个项目 的两种方式_nginx部署多个web项目__Rookie._的博客-CSDN博客
https://www.cnblogs.com/btxlc/p/11592886.html nginx配置部署多个单页应用 踩坑