for projects built with angularcli 6.0.2 and nginx as proxy, the js/css file path is 404
.
nginx
--base-href ./index.htmlbase href./
jshtml 200
for projects built with angularcli 6.0.2 and nginx as proxy, the js/css file path is 404
.
nginx
--base-href ./index.htmlbase href./
jshtml 200
what you are doing is wrong. You should not use reverse proxies. These are static resources. Why not put them directly in the nginx directory?
solved, use this command: "ng build-- base-href / ng6-ant/-- prod", where 'ng6-ant' is the ID of the agent listening on the server
location /ng6-ant {
alias /home/nginx_web/ng6-ant;
index index.html index.htm;
try_files $uri $uri/ /index.html =404;
}
how to prefix the address for css/js in the index.html code of build with a. / prefix
Previous: How is the swagger3.x version translated into Chinese?
Next: In nuxt.js: will an error be reported when src parses the value in data?