Linux相关2023-12-11 · 约 1 分钟

Linux/Centos系统中配置Nginx图片映射目录和接口转发配置

暮色陈陈101 阅读0 赞1 评论最后更新 2026-09-16

具体配置如下👇

conf 复制代码
server
{
    listen 80;
    server_name kxforum.top;
    index index.html;
    root /www/server/nginx/html;
    # 解决vue路由404
    try_files $uri $uri/ /index.html;
    
    
    location /images {
        alias /www/wwwroot/images/;
        autoindex on;
    }
    
    location /planet/admin {
        proxy_pass http://127.0.0.1:8101/admin;
    }
    
    location /planet/client {
        proxy_pass http://127.0.0.1:8201/client;
    }
}
觉得有用就点个赞吧
评论 1 条
0 / 300
  • 我再睡一会儿。博主2023-12-13 09:31:45

    欢迎大家留言讨论~