Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/36.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
Nginx配置AngularJS_Angularjs_Node.js_Nginx - Fatal编程技术网

Nginx配置AngularJS

Nginx配置AngularJS,angularjs,node.js,nginx,Angularjs,Node.js,Nginx,我有一个AngularJS项目,它在节点服务器上运行,现在我正在使用NGINX web服务器,并将我的项目从节点转移到了NGINX。 nginx配置是 location /bourbonweb { root /var/sites/bourbon/; index index.html; location ~ ^/bourbon/bourbonweb/(.+\.html)$ { try_files $uri =404; root /var/sites/bourbon/; fa

我有一个AngularJS项目,它在节点服务器上运行,现在我正在使用NGINX web服务器,并将我的项目从节点转移到了NGINX。 nginx配置是

location /bourbonweb {
root /var/sites/bourbon/;
index index.html;
location ~ ^/bourbon/bourbonweb/(.+\.html)$ {
    try_files $uri =404;
    root /var/sites/bourbon/;
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_index index.html;
    fastcgi_param SCRIPT_FILENAME /var/sites/$fastcgi_script_name;
    include /etc/nginx/fastcgi_params;
}
location ~* /bourbonweb/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
     root /var/sites/bourbon/;
}
它起作用了。 和项目目录结构 1.波旁威士忌 2.bourbon文件夹内bourbonweb、bower_组件、node_模块等 3.在bourbonweb中输入代码我的css、js、img、视图、控制器、指令、服务都在那里

我面临的问题是404找不到错误。它只是没有从bower_组件文件夹加载。rest所有文件正在加载。仅AngularJS模块未从bower_组件获取负载

请帮帮我
提前感谢。

您需要显示更多代码,特别是节点的路由逻辑。您需要显示更多代码,特别是节点的路由逻辑。