Comments (6)
这应该和你用的框架有关吧,https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/405
from hprose-php.
405是nginx输出的,如果请求打到了一个静态文件上,并且是post请求就会这样,检查下nginx配置吧
from hprose-php.
楼上说的没错,但是如果hprose能支持GET请求(默认好像都是POST的?)静态资源这个问题是可以解决的。
这样的应用场景比较多,当nginx要实现伪静态时,大部分都是类似xx.html, xxx/xx/这种地址,不支持的话应付不了很多场景,apache也是类似。
from hprose-php.
@ycaihappy 你没看明白,伪静态是可以可以的,但是这个明显是你的nginx配置错误,Client必须请求到一个Serve,请确认这个请求'http://xxxx/wus/v1/'能否到Serve
from hprose-php.
贴出你的nginx配置一看就知道了。这个肯定是rewrite配置不对,导致请求没有到hprose上 或者说没有到php-fpm
from hprose-php.
@Liv1020 http://xxxx/wus/v1/ 是可以得到服务结果的。。
@lscgzwd nginx配置是正确的。。
问题已经解决。原因是使用lumen框架的时候路由注册的是GET,改成POST就可以了。谢谢大家关注。
POST /wus/v1/ HTTP/1.1" 405 没改lumen前
POST /wus/v1/ HTTP/1.1" 200 修改lumen后
from hprose-php.
Related Issues (20)
- PHP7.4 下2.0版本数组语法问题 HOT 3
- 系统安装 HOT 1
- Es17"Wrong Request: "z,请问各位大神这个是怎么回事呀 HOT 5
- 3.0版本的client计划支持批量调用吗? HOT 1
- 2.0按照示例做报错啊Exception Argument func must be callable. HOT 2
- 报错 找不到这个类 Hprose\BytesIO HOT 3
- 怎么重启已经启动的tcp服务 HOT 1
- 协程Future\co,yield偶发返回promise对象。 HOT 2
- hprose能否支持stream响应,在获取数据量很大时候用 HOT 4
- php服务端如何获取ip? HOT 2
- composer怎么安装v3.0的版本 HOT 1
- request write error? HOT 2
- 服务端抛出系统异常没有经过Filter怎么办? HOT 3
- 找不到类“Hprose\Socket\Service” HOT 2
- php8.1.4 编辑 hprose1.8.0扩展报错 HOT 2
- php8+支持吗,扩展一直装不成功 HOT 1
- 请求返回错误,数据太大了 ?“18: transfer closed with 332804 bytes remaining to read” HOT 3
- Hprose\Socket\Transporter->syncSendAndReceive('Cs11"..) HOT 1
- 本地Mac命令行启动正常,线上环境Ubuntu启动马上退出
- hprose 客户端怎么管理服务端的事务呢? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hprose-php.