发出POST请求后不允许使用Nginx 405
当我尝试从另一个服务发出POST请求(检查请求是否通过)时,我收到一个NGINX 405不允许的错误 在nginx错误日志中,我得到:发出POST请求后不允许使用Nginx 405,nginx,Nginx,当我尝试从另一个服务发出POST请求(检查请求是否通过)时,我收到一个NGINX 405不允许的错误 在nginx错误日志中,我得到: 2021/06/02 13:29:20 [warn] 14018#14018: *2599 using uninitialized "subdomain" variable, client: 162.158.183.234, server: dev.example.com, request: "POST /api/callback
2021/06/02 13:29:20 [warn] 14018#14018: *2599 using uninitialized "subdomain" variable, client: 162.158.183.234, server: dev.example.com, request: "POST /api/callback HTTP/1.1", host: "dev.example.com"
此项目现在在dev
子域中运行
我的站点nginx conf:
server {
server_name dev.example.com *.dev.example.com www.dev.example.com;
charset off;
index index.php index.html;
disable_symlinks if_not_owner from=$root_path;
include /etc/nginx/vhosts-includes/*.conf;
include /etc/nginx/vhosts-resources/dev.example.com/*.conf;
access_log /var/www/httpd-logs/dev.example.com.access.log;
error_log /var/www/httpd-logs/dev.example.com.error.log notice;
ssi on;
set $root_path /var/www/www-root/data/www/dev.example.com/frontend/dist;
gzip on;
gzip_comp_level 5;
gzip_disable "msie6";
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;
location / {
try_files $uri $uri/ /index.html;
}
root $root_path/$subdomain;
listen 188.201.126.258:80;
listen [2a01:4f8:112:29d2::2]:80;
}
我使用nginx+vuejs+nestjs。哪里会有问题?我怎么能修好它