Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/89.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
index.html尝试从根URI解析css文件_Html_Css_Angular - Fatal编程技术网

index.html尝试从根URI解析css文件

index.html尝试从根URI解析css文件,html,css,angular,Html,Css,Angular,我刚刚构建了angular 11+应用程序,并将生成的文件放入我的www/文件夹中 我已经有一个网站在www 所以我只是把我的文件放在一个子文件夹www/second site 访问https://my-domain.com/second-site我在控制台上发现一些错误 Refused to apply style from 'https://my-site.com/styles.b571ddf4692cab415961.css' because its MIME type ('text/

我刚刚构建了angular 11+应用程序,并将生成的文件放入我的
www/
文件夹中

  • 我已经有一个网站在
    www
  • 所以我只是把我的文件放在一个子文件夹
    www/second site
访问
https://my-domain.com/second-site
我在控制台上发现一些错误

Refused to apply style from 'https://my-site.com/styles.b571ddf4692cab415961.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
它尝试从根目录中获取
style.css
,但应该尝试从
https://my-site.com/second-side


这是一个角度错误配置还是我应该编辑我的nginx配置?我有点困惑

在索引中将第二个站点声明为基本href。html@Romain你解决了这个问题吗?@Zamadulvahid是的。我必须在我的角度配置中定义基本href