• notice
  • Congratulations on the launch of the Sought Tech site

Nginx's 405 not allowed error solution [prompting 405 error problem]

1. First look at the prompt message that appears 405


    
  405 Not Allowed  nginx/1.8.1

This is because when nginx is installed, the default static file prohibits the use of POST requests, and the prohibition information appears


2, there are the following three solutions

1) Add error_page 405 =200 $uri to the location under the static server;

Modify the src/http/modules/ngx_http_static_module.c file under nginx


Comment out this paragraph, recompile, do not make install and copy the generated nginx file to sbin Restart nginx


3) 

upstream static_backend {   
    server localhost : 80 ; }    
  server {   
    listen 80 ; # ...   
    error_page 405 = 200 @ 405 ;   
    location @ 405 {   
        root / srv / http ;   
        proxy_method GET ;   
        proxy_pass http : //static_backend;   } }



Tags

Technical otaku

Sought technology together

Related Topic

0 Comments

Leave a Reply

+