小编We0*_*We0的帖子

1 stderr发送的FastCGI:"主脚本未知"

我第一次使用Nginx,但我不熟悉Apache和Linux.我正在使用现有的项目,当我试图看到index.php时,我找不到404文件.

这是access.log条目:

2013/06/19 16:23:23 [error] 2216#0: *1 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 127.0.0.1, server: localhost, request: "GET /index.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "www.ordercloud.lh"
Run Code Online (Sandbox Code Playgroud)

以下是网站可用文件:

server {
# Listening on port 80 without an IP address is only recommended if you are not running multiple v-hosts
    listen       80;
# Bind to the public IP bound to your domain
#listen 127.0.0.11:80;
# Specify this vhost's domain name
    server_name www.ordercloud.lh;
    root /home/willem/git/console/frontend/www;
    index index.php …
Run Code Online (Sandbox Code Playgroud)

php nginx

13
推荐指数
4
解决办法
8万
查看次数

Restful API命名约定

所以我和我的老板不同意这里,也找不到任何相关信息.场景:我想获得某个组织的所有用户.URL应该是什么?

mydomain.com/users/by/organisation/{orgId}

要么

mydomain.com/organisation/{orgId}/users

我们的论点:

情况1:呼叫预期返回"用户",因此"资源"(呼叫的第一部分)应该与之相关.

案例2:组织"拥有"/"是用户的父母,因此组织应该是第一位的.

你的想法是什么?

更新: 我不担心之后会发生什么mydomain.com/{resource}.问题主要涉及HTTP操作(GET,POST,PUT,DELETE)是否应与第一个资源相关mydomain.com/users或是否应该反映该关系mydomain.com/organisations/users/.

rest naming-conventions restful-architecture

10
推荐指数
3
解决办法
3万
查看次数