nginx中的Angular 4应用程序无法加载文件
我已经使用nginx部署了angular4应用程序。但它无法加载js、css和其他文件。我在控制台中看到这些错误 未捕获的语法错误:意外标记nginx中的Angular 4应用程序无法加载文件,angular,ubuntu,nginx,Angular,Ubuntu,Nginx,我已经使用nginx部署了angular4应用程序。但它无法加载js、css和其他文件。我在控制台中看到这些错误 未捕获的语法错误:意外标记
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;
server_name _;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
#alias /web-portal/;
root /var/www/html/web-portal/;
try_files $uri$args $uri$args/ /index.html =404;
}
}
请帮我解决这个问题 这似乎是“Angular App中的语法错误:意外标记”的重复