我试图将旧的API端点移到新的Restful (描述性)端点。我尝试了下面的nginx配置,用于将旧请求重写到新的端点,但它不起作用。任何帮助都将不胜感激。
server {
listen 80;
root /path/to/api/entry/file;
index index.php;
server_name api.example.com;
#Below not rewriting http://api.example.com/create/ to http://api.example.com/user
我的Nginx配置有问题。我有两个服务器,一个带有nginx,一个带有webApp in symfony3。这是我的配置:
location /portal/mysite/ {
set $frontRoot /srv/data/apps/mysite-portal-stag/current/web;
set $sfApp app.php; # Change to app.php for prod or app_dev.php for dev
root /srv/data/apps/mysite-portal-stag/current/web;
rewri
我无法使用php-fpm正确配置Nginx。当我得到任何php脚本时,我在浏览器中得到Nginx 404 Not found错误:
File not found.
在我的php-fpm日志中,我得到:
172.17.42.1 - 28/Apr/2015:09:15:15 +0000 "GET /index.php" 404
对于任何php脚本调用和Nginx日志,我都会得到:
[error] 28105#0: *1 FastCGI sent in stderr: "Primary script unknown" while reading response h
我犯了这个错误。显然,我想使用ckfinder文件上传。
Access to the script '/var/www/example.com/public/admin/scripts/vendor/ckfinder
/core/connector/php' has been denied (see security.limit_extensions) while reading
response header from upstream, client: x.x.x.x, server:
example.com, request: "GET /admin/scri