最近开始看vue的开发,本地完成了appserver的配置
但是vue首页调用API_ROOT nginx就报错了
2017/11/16 00:33:04 [error] 83093#0: *193 open() "/usr/local/var/www/cms/home/index" failed (2: No such file or directory), client: 127.0.0.1, server: localhost, request: "GET /cms/home/index HTTP/1.1", host: "appserver.fecshoptest.com"
nginx配置使用模板提供的配置:
server {
listen 80 ;
server_name appserver.fecshoptest.com;
root 我的站点根目录/fecshop/appserver/web;
server_tokens off;
include none.conf;
index index.php index.html index.htm;
access_log /usr/local/var/log/fecshop/access.log wwwlogs;
error_log /usr/local/var/log/fecshop/error.log notice;
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fcgi.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {
expires 30d;
}
location ~ .*\.(js|css)?$ {
expires 12h;
}
location /api {
rewrite /api/([a-z][0-9a-z_]+)/?$ /api.php?type=$1;
}
}
这是什么问题呢?
本文由 madmen 创作,采用 知识共享署名 3.0 中国大陆许可协议 进行许可。
可自由转载、引用,但需署名作者且注明文章出处。