Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]nginx配置主应用location到二级路径导致子应用无法加载 #2856

Closed
shier-code opened this issue Dec 22, 2023 · 0 comments
Closed

Comments

@shier-code
Copy link

shier-code commented Dec 22, 2023

部署时nginx通过以下方式配置到服务器根路径访问,遵循entry和publicpath一致,所用应用放在同层级文件夹,可正常访问主应用和子应用

        location /{
            alias   html/qk-isptl/;
            index  index.html index.htm;
        }
        location /qk-isptl/rxfb/ {
            alias html/rxfb/;
            index  index.html index.htm;
            try_files $uri $uri/ /index.html;
        }

生产环境受到部署限制,服务器根路径已被其他系统占用,各种原因也不允许通过根路径访问本系统,按以下方式配置,主应用能够正常通过二级路径访问,子应用无法加载,在子应用路由下刷新只会重新加载主应用静态资源并304

        location /qk-isptl {
            alias   html/qk-isptl/;
            index  index.html index.htm;
        }
        location /qk-isptl/rxfb/ {
            alias html/rxfb/;
            index  index.html index.htm;
            try_files $uri $uri/ /index.html;
       }

#2273 该问题类似

@umijs umijs locked and limited conversation to collaborators Dec 25, 2023
@kuitos kuitos converted this issue into discussion #2858 Dec 25, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant