惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
H
Hacker News: Front Page
P
Palo Alto Networks Blog
T
ThreatConnect
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
T
True Tiger Recordings
P
Privacy & Cybersecurity Law Blog
B
Blog
IT之家
IT之家
Last Week in AI
Last Week in AI
F
Full Disclosure
Hacker News: Ask HN
Hacker News: Ask HN
C
Comments on: Blog
Microsoft Azure Blog
Microsoft Azure Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Microsoft Security Blog
Microsoft Security Blog
博客园 - 【当耐特】
N
News and Events Feed by Topic
NISL@THU
NISL@THU
腾讯CDC
雷峰网
雷峰网
Security Latest
Security Latest
李成银的技术随笔
M
Microsoft Research Blog - Microsoft Research
L
LangChain Blog
L
Lohrmann on Cybersecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Check Point Blog
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
博客园 - Franky
N
News | PayPal Newsroom
V
V2EX
A
About on SuperTechFans
The Register - Security
The Register - Security
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google Online Security Blog
Google Online Security Blog
MyScale Blog
MyScale Blog
Cisco Talos Blog
Cisco Talos Blog
Vercel News
Vercel News
WordPress大学
WordPress大学
C
Cyber Attacks, Cyber Crime and Cyber Security
The Hacker News
The Hacker News
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
爱范儿
爱范儿
A
Arctic Wolf
L
LINUX DO - 最新话题
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

博客园 - ZXJ~佳

openclaw错误之令牌过期 openclaw 常用操作命令 windows10本地部署openclaw Windows安装向量数据库weaviate java冒泡排序 layer实现表格大图预览功能 js中Enter切换文本框,方便快捷输入 前端密码加密后端解密保证登录安全 java面试题 mysql8新特性CTE递归实现30天时间日期 Vala之入门篇(二)Vala安装 Vala之入门篇(一)Vala简介 Mybatis—Generator使用教程 JAVA8十大新特性详解 博客主题 nideshop小程序商城部署 Eclipse创建Maven多模块工程Module开发(图文教程) 将博客搬至CSDN
windows部署ruoyiAI应用-nginx配置后台管理端和用户管理端
ZXJ~佳 · 2025-11-30 · via 博客园 - ZXJ~佳

我这里用到一个很方便的工具-phpstudy

首先需要去官网下载phpstudy工具https://m.xp.cn/phpstudy

一、首页-->nginx启动

1764509211594

 二、网站-->创建域名admin端口8081和域名web端口8082

1764509363768

 三、每个域名和端口配置对应的根目录

1764509420397

1764509458160

四、然后把前端项目打包,放到nginx根目录下

1764509564347

 五、两个前端的nginx配置

当网站创建好后,会在设置-->配置文件-->vhosts.conf有两个配置文件需要修改这两个配置文件

1764509735876

 六、点开这两个配置文件进行修改

1.admin的nginx配置

server {
        listen        8081;
        server_name  admin;
        root   "D:/phpstudy/WWW/admin";
      
   location /prod-api/{
        proxy_pass http://127.0.0.1:6039/; 
        proxy_ssl_server_name on;
        proxy_set_header Host $http_host;
    }

    location / {
        try_files $uri $uri/ @router;
        index index.html;
    }
    location @router {
        rewrite ^.*$ /index.html last;
    }
}

2.web的nginx配置

server {
        listen        8082;
        server_name  web;
        root   "D:/phpstudy/WWW/web";
        location / {
            index index.php index.html error/index.html;
            error_page 400 /error/400.html;
            error_page 403 /error/403.html;
            error_page 404 /error/404.html;
            error_page 500 /error/500.html;
            error_page 501 /error/501.html;
            error_page 502 /error/502.html;
            error_page 503 /error/503.html;
            error_page 504 /error/504.html;
            error_page 505 /error/505.html;
            error_page 506 /error/506.html;
            error_page 507 /error/507.html;
            error_page 509 /error/509.html;
            error_page 510 /error/510.html;
            include D:/phpstudy/WWW/web/nginx.htaccess;
            autoindex  off;
        }
    location /api/{
        proxy_pass http://127.0.0.1:6039/; 
        proxy_ssl_server_name on;
        proxy_buffering off;
        proxy_set_header Host $http_host;
    }
        location ~ \.php(.*)$ {
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_split_path_info  ^((?U).+\.php)(/?.+)$;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            fastcgi_param  PATH_INFO  $fastcgi_path_info;
            fastcgi_param  PATH_TRANSLATED  $document_root$fastcgi_path_info;
            include        fastcgi_params;
        }
}

七、启动重启nginx