Welcome! Log In Create A New Profile

Advanced

Nginx - 405 not allowed on POST

Posted by gaveen5555 
Nginx - 405 not allowed on POST
January 21, 2021 11:54AM
0


So i have a web site hosted on my server and it has a login page. When i try to log in to my web app, I'm getting status code 405 Not Allowed. After some research i found a solution to add error_page 405 = 200 $uri to my server block. After that my request got a 200 status code but i'm still unable to log in as the response is invalid. How can i fix this issue?

this is how my server block looks like

server {

root /var/www/domain.com;
index index.html index.htm index.nginx-debian.html;

server_name domain.com www.domain.com;

location / {
root /var/www/domain.com;
index index.html index.htm;
try_files $uri /index.html$is_args$args =404;
}

#error_page 405 = 200 $uri // i commented this line as it did not fix my issue.

}
I found a solution here but i'm confused as how to implement this solution to my server block

http://invalidlogic.com/2011/04/12/serving-static-content-via-post-from-nginx/
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 241
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready