What the 405 error may mean in nginx error log when migrating from Apache to nginx?Experience in migrating from Apache to nginx?What does '0U' mean in apache's error-log?What does the error message 'Attempt to serve directory' mean in apache log?Migrating Apache rewrites to NginxWhat does this nginx error “rewrite or internal redirection cycle” mean?mod_rewrite errors when migrating from Apache 2.4 to Apache 2.2What does `p` option mean when starting NginxWhat does the at-sign “@” mean in nginx location blocks?migrating htaccess from Apache to nginx
How to make thick Asian sauces?
Using new lumber in an old wall with larger lumber dimensions
Diet Coke or water?
Old black and white movie: glowing black rocks slowly turn you into stone upon touch
Is it a problem that pull requests are approved without any comments
Linux tr to convert vertical text to horizontal
How bad would a partial hash leak be, realistically?
Did Darth Vader wear the same suit for 20+ years?
Prove that a function is indefinitely differentiable
Is the capacitor drawn or wired wrongly?
Can you please explain this joke: "I'm going bananas is what I tell my bananas before I leave the house"?
Can a magnetic field of an object be stronger than its gravity?
Working in the USA for living expenses only; allowed on VWP?
My coworkers think I had a long honeymoon. Actually I was diagnosed with cancer. How do I talk about it?
In this example, which path would a monster affected by the Dissonant Whispers spell take?
What are the words for people who cause trouble believing they know better?
What are they doing to this poor rocket?
Could the Missouri River be running while Lake Michigan was frozen several meters deep?
Can Green-Flame Blade be cast twice with the Hunter ranger's Horde Breaker ability?
What's the logic behind the the organization of Hamburg's bus transport into "rings"?
Is the decompression of compressed and encrypted data without decryption also theoretically impossible?
What flavor of zksnark in tezos
What's the correct term for a waitress in the Middle Ages?
What do we gain with higher order logics?
What the 405 error may mean in nginx error log when migrating from Apache to nginx?
Experience in migrating from Apache to nginx?What does '0U' mean in apache's error-log?What does the error message 'Attempt to serve directory' mean in apache log?Migrating Apache rewrites to NginxWhat does this nginx error “rewrite or internal redirection cycle” mean?mod_rewrite errors when migrating from Apache 2.4 to Apache 2.2What does `p` option mean when starting NginxWhat does the at-sign “@” mean in nginx location blocks?migrating htaccess from Apache to nginx
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I am trying to migrate Topincs installation from Apache to nginx running on Debian Wheezy and using php-fmp. The only error I'm getting is
HTTP/1.1 405 Method Not Allowed
Would be grateful for any hint how to tackle this problem.
Here is my site configuration in /etc/nginx/sites-enabled/my-app
server
listen 80;
server_name localhost;
index index.php;
root /home/my-app/topincs/docroot;
fastcgi_intercept_errors on;
location ~ .php$
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
location ~ nkm
fastcgi_param TOPINCS_STORE nkm;
try_files $uri $uri/ /index.php;
location ~ /.[0-9].[0-9]+.[0-9](beta([0-9]+))?
add_header Expires "Fri, 31 Dec 2020 23:59:59 GMT";
add_header Cache-Control "public";
location /nkm
rewrite ^/nkm/([3-9].[0-9].[0-9].*/(.core-topics
Here are original Apache conf files:
httpd.conf
RewriteEngine on
<Directory "/home/my-app/topincs/docroot">
Order allow,deny
Allow from all
DirectoryIndex index.php
AddType 'text/html; charset=UTF-8' .html
DefaultType application/x-httpd-php
php_value include_path "/home/my-app/topincs/php:/home/my-app/topincs/vendor/php"
php_value default_charset "UTF-8"
php_value magic_quotes_gpc "0"
php_value max_execution_time "7200"
php_value memory_limit "500M"
php_value short_open_tag "0"
</Directory>
<Directory ~ "/home/my-app/topincs/docroot/[0-9].[0-9]+.[0-9](beta([0-9]+))?">
FileETag none
Header set Expires "Fri, 31 Dec 2020 23:59:59 GMT"
Header set Cache-control "public"
</Directory>
Include "/home/my-app/topincs/conf/*.httpd.conf"
The only other file in /home/my-app/topincs/conf/ is nkm.httpd.conf:
<LocationMatch ^/nkm/.*>
SetEnv TOPINCS_STORE nkm
</LocationMatch>
#RewriteRule ^/nkm/test/(.*)$ /nkm/test/$1 [PT,E=TOPINCS_STORE:nkm]
RewriteRule ^/nkm/([3-9].[0-9].[0-9].*/(.core-topics|css|images|js|vendor|fonts).*)$ /nkm/$1 [PT,E=TOPINCS_STORE:nkm]
RewriteRule ^/nkm((.|/).*)$ /nkm/.topincs?request=$1 [PT,L,QSA,E=TOPINCS_STORE:nkm]
Alias /nkm "/home/my-app/topincs/docroot"
and to default /etc/php5/fpm/pool.d/www.conf I added the following lines:
php_value[include_path] = "/home/my-app/topincs/php:/home/my-app/topincs/vendor/php"
php_value[default_charset] = "UTF-8"
php_value[magic_quotes_gpc] = "0"
php_value[php_value max_execution_time] = "7200"
php_value[php_value memory_limit] = "500M"
php_value[php_value short_open_tag] = "0"
apache-2.2 nginx fastcgi
add a comment |
I am trying to migrate Topincs installation from Apache to nginx running on Debian Wheezy and using php-fmp. The only error I'm getting is
HTTP/1.1 405 Method Not Allowed
Would be grateful for any hint how to tackle this problem.
Here is my site configuration in /etc/nginx/sites-enabled/my-app
server
listen 80;
server_name localhost;
index index.php;
root /home/my-app/topincs/docroot;
fastcgi_intercept_errors on;
location ~ .php$
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
location ~ nkm
fastcgi_param TOPINCS_STORE nkm;
try_files $uri $uri/ /index.php;
location ~ /.[0-9].[0-9]+.[0-9](beta([0-9]+))?
add_header Expires "Fri, 31 Dec 2020 23:59:59 GMT";
add_header Cache-Control "public";
location /nkm
rewrite ^/nkm/([3-9].[0-9].[0-9].*/(.core-topics
Here are original Apache conf files:
httpd.conf
RewriteEngine on
<Directory "/home/my-app/topincs/docroot">
Order allow,deny
Allow from all
DirectoryIndex index.php
AddType 'text/html; charset=UTF-8' .html
DefaultType application/x-httpd-php
php_value include_path "/home/my-app/topincs/php:/home/my-app/topincs/vendor/php"
php_value default_charset "UTF-8"
php_value magic_quotes_gpc "0"
php_value max_execution_time "7200"
php_value memory_limit "500M"
php_value short_open_tag "0"
</Directory>
<Directory ~ "/home/my-app/topincs/docroot/[0-9].[0-9]+.[0-9](beta([0-9]+))?">
FileETag none
Header set Expires "Fri, 31 Dec 2020 23:59:59 GMT"
Header set Cache-control "public"
</Directory>
Include "/home/my-app/topincs/conf/*.httpd.conf"
The only other file in /home/my-app/topincs/conf/ is nkm.httpd.conf:
<LocationMatch ^/nkm/.*>
SetEnv TOPINCS_STORE nkm
</LocationMatch>
#RewriteRule ^/nkm/test/(.*)$ /nkm/test/$1 [PT,E=TOPINCS_STORE:nkm]
RewriteRule ^/nkm/([3-9].[0-9].[0-9].*/(.core-topics|css|images|js|vendor|fonts).*)$ /nkm/$1 [PT,E=TOPINCS_STORE:nkm]
RewriteRule ^/nkm((.|/).*)$ /nkm/.topincs?request=$1 [PT,L,QSA,E=TOPINCS_STORE:nkm]
Alias /nkm "/home/my-app/topincs/docroot"
and to default /etc/php5/fpm/pool.d/www.conf I added the following lines:
php_value[include_path] = "/home/my-app/topincs/php:/home/my-app/topincs/vendor/php"
php_value[default_charset] = "UTF-8"
php_value[magic_quotes_gpc] = "0"
php_value[php_value max_execution_time] = "7200"
php_value[php_value memory_limit] = "500M"
php_value[php_value short_open_tag] = "0"
apache-2.2 nginx fastcgi
I don't see any obvious issues with the configuration you've posted. I suspect the issue is going to be in your web application.
– Michael Hampton♦
Jun 8 '13 at 17:42
The application is running just fine under Apache. Is it possible that differences between php backends might be to blame?
– helcim
Jun 8 '13 at 17:46
Consider that nginx does not use .htaccess files. So it could be the case that under Apache a .htaccess was used to modify configuration of php and/or apache modules which are required by your application.
– leepfrog
Jun 8 '13 at 17:52
Do NOT uselocation ~ .php$ {
, it is insecure. See nealpoole.com/blog/2011/04/…
– NuclearPeon
May 27 '14 at 1:33
add a comment |
I am trying to migrate Topincs installation from Apache to nginx running on Debian Wheezy and using php-fmp. The only error I'm getting is
HTTP/1.1 405 Method Not Allowed
Would be grateful for any hint how to tackle this problem.
Here is my site configuration in /etc/nginx/sites-enabled/my-app
server
listen 80;
server_name localhost;
index index.php;
root /home/my-app/topincs/docroot;
fastcgi_intercept_errors on;
location ~ .php$
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
location ~ nkm
fastcgi_param TOPINCS_STORE nkm;
try_files $uri $uri/ /index.php;
location ~ /.[0-9].[0-9]+.[0-9](beta([0-9]+))?
add_header Expires "Fri, 31 Dec 2020 23:59:59 GMT";
add_header Cache-Control "public";
location /nkm
rewrite ^/nkm/([3-9].[0-9].[0-9].*/(.core-topics
Here are original Apache conf files:
httpd.conf
RewriteEngine on
<Directory "/home/my-app/topincs/docroot">
Order allow,deny
Allow from all
DirectoryIndex index.php
AddType 'text/html; charset=UTF-8' .html
DefaultType application/x-httpd-php
php_value include_path "/home/my-app/topincs/php:/home/my-app/topincs/vendor/php"
php_value default_charset "UTF-8"
php_value magic_quotes_gpc "0"
php_value max_execution_time "7200"
php_value memory_limit "500M"
php_value short_open_tag "0"
</Directory>
<Directory ~ "/home/my-app/topincs/docroot/[0-9].[0-9]+.[0-9](beta([0-9]+))?">
FileETag none
Header set Expires "Fri, 31 Dec 2020 23:59:59 GMT"
Header set Cache-control "public"
</Directory>
Include "/home/my-app/topincs/conf/*.httpd.conf"
The only other file in /home/my-app/topincs/conf/ is nkm.httpd.conf:
<LocationMatch ^/nkm/.*>
SetEnv TOPINCS_STORE nkm
</LocationMatch>
#RewriteRule ^/nkm/test/(.*)$ /nkm/test/$1 [PT,E=TOPINCS_STORE:nkm]
RewriteRule ^/nkm/([3-9].[0-9].[0-9].*/(.core-topics|css|images|js|vendor|fonts).*)$ /nkm/$1 [PT,E=TOPINCS_STORE:nkm]
RewriteRule ^/nkm((.|/).*)$ /nkm/.topincs?request=$1 [PT,L,QSA,E=TOPINCS_STORE:nkm]
Alias /nkm "/home/my-app/topincs/docroot"
and to default /etc/php5/fpm/pool.d/www.conf I added the following lines:
php_value[include_path] = "/home/my-app/topincs/php:/home/my-app/topincs/vendor/php"
php_value[default_charset] = "UTF-8"
php_value[magic_quotes_gpc] = "0"
php_value[php_value max_execution_time] = "7200"
php_value[php_value memory_limit] = "500M"
php_value[php_value short_open_tag] = "0"
apache-2.2 nginx fastcgi
I am trying to migrate Topincs installation from Apache to nginx running on Debian Wheezy and using php-fmp. The only error I'm getting is
HTTP/1.1 405 Method Not Allowed
Would be grateful for any hint how to tackle this problem.
Here is my site configuration in /etc/nginx/sites-enabled/my-app
server
listen 80;
server_name localhost;
index index.php;
root /home/my-app/topincs/docroot;
fastcgi_intercept_errors on;
location ~ .php$
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
location ~ nkm
fastcgi_param TOPINCS_STORE nkm;
try_files $uri $uri/ /index.php;
location ~ /.[0-9].[0-9]+.[0-9](beta([0-9]+))?
add_header Expires "Fri, 31 Dec 2020 23:59:59 GMT";
add_header Cache-Control "public";
location /nkm
rewrite ^/nkm/([3-9].[0-9].[0-9].*/(.core-topics
Here are original Apache conf files:
httpd.conf
RewriteEngine on
<Directory "/home/my-app/topincs/docroot">
Order allow,deny
Allow from all
DirectoryIndex index.php
AddType 'text/html; charset=UTF-8' .html
DefaultType application/x-httpd-php
php_value include_path "/home/my-app/topincs/php:/home/my-app/topincs/vendor/php"
php_value default_charset "UTF-8"
php_value magic_quotes_gpc "0"
php_value max_execution_time "7200"
php_value memory_limit "500M"
php_value short_open_tag "0"
</Directory>
<Directory ~ "/home/my-app/topincs/docroot/[0-9].[0-9]+.[0-9](beta([0-9]+))?">
FileETag none
Header set Expires "Fri, 31 Dec 2020 23:59:59 GMT"
Header set Cache-control "public"
</Directory>
Include "/home/my-app/topincs/conf/*.httpd.conf"
The only other file in /home/my-app/topincs/conf/ is nkm.httpd.conf:
<LocationMatch ^/nkm/.*>
SetEnv TOPINCS_STORE nkm
</LocationMatch>
#RewriteRule ^/nkm/test/(.*)$ /nkm/test/$1 [PT,E=TOPINCS_STORE:nkm]
RewriteRule ^/nkm/([3-9].[0-9].[0-9].*/(.core-topics|css|images|js|vendor|fonts).*)$ /nkm/$1 [PT,E=TOPINCS_STORE:nkm]
RewriteRule ^/nkm((.|/).*)$ /nkm/.topincs?request=$1 [PT,L,QSA,E=TOPINCS_STORE:nkm]
Alias /nkm "/home/my-app/topincs/docroot"
and to default /etc/php5/fpm/pool.d/www.conf I added the following lines:
php_value[include_path] = "/home/my-app/topincs/php:/home/my-app/topincs/vendor/php"
php_value[default_charset] = "UTF-8"
php_value[magic_quotes_gpc] = "0"
php_value[php_value max_execution_time] = "7200"
php_value[php_value memory_limit] = "500M"
php_value[php_value short_open_tag] = "0"
apache-2.2 nginx fastcgi
apache-2.2 nginx fastcgi
edited Jun 16 '13 at 9:08
helcim
asked Jun 8 '13 at 10:07
helcimhelcim
1531312
1531312
I don't see any obvious issues with the configuration you've posted. I suspect the issue is going to be in your web application.
– Michael Hampton♦
Jun 8 '13 at 17:42
The application is running just fine under Apache. Is it possible that differences between php backends might be to blame?
– helcim
Jun 8 '13 at 17:46
Consider that nginx does not use .htaccess files. So it could be the case that under Apache a .htaccess was used to modify configuration of php and/or apache modules which are required by your application.
– leepfrog
Jun 8 '13 at 17:52
Do NOT uselocation ~ .php$ {
, it is insecure. See nealpoole.com/blog/2011/04/…
– NuclearPeon
May 27 '14 at 1:33
add a comment |
I don't see any obvious issues with the configuration you've posted. I suspect the issue is going to be in your web application.
– Michael Hampton♦
Jun 8 '13 at 17:42
The application is running just fine under Apache. Is it possible that differences between php backends might be to blame?
– helcim
Jun 8 '13 at 17:46
Consider that nginx does not use .htaccess files. So it could be the case that under Apache a .htaccess was used to modify configuration of php and/or apache modules which are required by your application.
– leepfrog
Jun 8 '13 at 17:52
Do NOT uselocation ~ .php$ {
, it is insecure. See nealpoole.com/blog/2011/04/…
– NuclearPeon
May 27 '14 at 1:33
I don't see any obvious issues with the configuration you've posted. I suspect the issue is going to be in your web application.
– Michael Hampton♦
Jun 8 '13 at 17:42
I don't see any obvious issues with the configuration you've posted. I suspect the issue is going to be in your web application.
– Michael Hampton♦
Jun 8 '13 at 17:42
The application is running just fine under Apache. Is it possible that differences between php backends might be to blame?
– helcim
Jun 8 '13 at 17:46
The application is running just fine under Apache. Is it possible that differences between php backends might be to blame?
– helcim
Jun 8 '13 at 17:46
Consider that nginx does not use .htaccess files. So it could be the case that under Apache a .htaccess was used to modify configuration of php and/or apache modules which are required by your application.
– leepfrog
Jun 8 '13 at 17:52
Consider that nginx does not use .htaccess files. So it could be the case that under Apache a .htaccess was used to modify configuration of php and/or apache modules which are required by your application.
– leepfrog
Jun 8 '13 at 17:52
Do NOT use
location ~ .php$ {
, it is insecure. See nealpoole.com/blog/2011/04/…– NuclearPeon
May 27 '14 at 1:33
Do NOT use
location ~ .php$ {
, it is insecure. See nealpoole.com/blog/2011/04/…– NuclearPeon
May 27 '14 at 1:33
add a comment |
1 Answer
1
active
oldest
votes
Are these requests POSTs? If so, this is a known issue. See here.
This link is dead. What was the "known issue"?
– Michael Hampton♦
Jan 16 at 16:18
Pasting the contents below. Essentially, you can't POST to a static page. Although, looking at it now, I'm not sure why I thought it was relevant to the question asked.
– chrskly
Jan 25 at 13:47
On Mon, Oct 08, 2007 at 12:15:58PM -0400, Jonathan Vanasco wrote: > I'm trying to POST a form to an html page -- there is no code ; i am > just faking a form flow for a client > > nginx gives me a "405 Not Allowed" on the post request ; i can get > the page fine > > is there a directive i can use to get around this ? No, as static page can not handle POST, so nginx return 405. There is workaround: error_page 405 = @405; location = @405 root ...;
– chrskly
Jan 25 at 13:47
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "2"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f514313%2fwhat-the-405-error-may-mean-in-nginx-error-log-when-migrating-from-apache-to-ngi%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Are these requests POSTs? If so, this is a known issue. See here.
This link is dead. What was the "known issue"?
– Michael Hampton♦
Jan 16 at 16:18
Pasting the contents below. Essentially, you can't POST to a static page. Although, looking at it now, I'm not sure why I thought it was relevant to the question asked.
– chrskly
Jan 25 at 13:47
On Mon, Oct 08, 2007 at 12:15:58PM -0400, Jonathan Vanasco wrote: > I'm trying to POST a form to an html page -- there is no code ; i am > just faking a form flow for a client > > nginx gives me a "405 Not Allowed" on the post request ; i can get > the page fine > > is there a directive i can use to get around this ? No, as static page can not handle POST, so nginx return 405. There is workaround: error_page 405 = @405; location = @405 root ...;
– chrskly
Jan 25 at 13:47
add a comment |
Are these requests POSTs? If so, this is a known issue. See here.
This link is dead. What was the "known issue"?
– Michael Hampton♦
Jan 16 at 16:18
Pasting the contents below. Essentially, you can't POST to a static page. Although, looking at it now, I'm not sure why I thought it was relevant to the question asked.
– chrskly
Jan 25 at 13:47
On Mon, Oct 08, 2007 at 12:15:58PM -0400, Jonathan Vanasco wrote: > I'm trying to POST a form to an html page -- there is no code ; i am > just faking a form flow for a client > > nginx gives me a "405 Not Allowed" on the post request ; i can get > the page fine > > is there a directive i can use to get around this ? No, as static page can not handle POST, so nginx return 405. There is workaround: error_page 405 = @405; location = @405 root ...;
– chrskly
Jan 25 at 13:47
add a comment |
Are these requests POSTs? If so, this is a known issue. See here.
Are these requests POSTs? If so, this is a known issue. See here.
answered Jun 9 '13 at 22:23
chrsklychrskly
1,194614
1,194614
This link is dead. What was the "known issue"?
– Michael Hampton♦
Jan 16 at 16:18
Pasting the contents below. Essentially, you can't POST to a static page. Although, looking at it now, I'm not sure why I thought it was relevant to the question asked.
– chrskly
Jan 25 at 13:47
On Mon, Oct 08, 2007 at 12:15:58PM -0400, Jonathan Vanasco wrote: > I'm trying to POST a form to an html page -- there is no code ; i am > just faking a form flow for a client > > nginx gives me a "405 Not Allowed" on the post request ; i can get > the page fine > > is there a directive i can use to get around this ? No, as static page can not handle POST, so nginx return 405. There is workaround: error_page 405 = @405; location = @405 root ...;
– chrskly
Jan 25 at 13:47
add a comment |
This link is dead. What was the "known issue"?
– Michael Hampton♦
Jan 16 at 16:18
Pasting the contents below. Essentially, you can't POST to a static page. Although, looking at it now, I'm not sure why I thought it was relevant to the question asked.
– chrskly
Jan 25 at 13:47
On Mon, Oct 08, 2007 at 12:15:58PM -0400, Jonathan Vanasco wrote: > I'm trying to POST a form to an html page -- there is no code ; i am > just faking a form flow for a client > > nginx gives me a "405 Not Allowed" on the post request ; i can get > the page fine > > is there a directive i can use to get around this ? No, as static page can not handle POST, so nginx return 405. There is workaround: error_page 405 = @405; location = @405 root ...;
– chrskly
Jan 25 at 13:47
This link is dead. What was the "known issue"?
– Michael Hampton♦
Jan 16 at 16:18
This link is dead. What was the "known issue"?
– Michael Hampton♦
Jan 16 at 16:18
Pasting the contents below. Essentially, you can't POST to a static page. Although, looking at it now, I'm not sure why I thought it was relevant to the question asked.
– chrskly
Jan 25 at 13:47
Pasting the contents below. Essentially, you can't POST to a static page. Although, looking at it now, I'm not sure why I thought it was relevant to the question asked.
– chrskly
Jan 25 at 13:47
On Mon, Oct 08, 2007 at 12:15:58PM -0400, Jonathan Vanasco wrote: > I'm trying to POST a form to an html page -- there is no code ; i am > just faking a form flow for a client > > nginx gives me a "405 Not Allowed" on the post request ; i can get > the page fine > > is there a directive i can use to get around this ? No, as static page can not handle POST, so nginx return 405. There is workaround: error_page 405 = @405; location = @405 root ...;
– chrskly
Jan 25 at 13:47
On Mon, Oct 08, 2007 at 12:15:58PM -0400, Jonathan Vanasco wrote: > I'm trying to POST a form to an html page -- there is no code ; i am > just faking a form flow for a client > > nginx gives me a "405 Not Allowed" on the post request ; i can get > the page fine > > is there a directive i can use to get around this ? No, as static page can not handle POST, so nginx return 405. There is workaround: error_page 405 = @405; location = @405 root ...;
– chrskly
Jan 25 at 13:47
add a comment |
Thanks for contributing an answer to Server Fault!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f514313%2fwhat-the-405-error-may-mean-in-nginx-error-log-when-migrating-from-apache-to-ngi%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I don't see any obvious issues with the configuration you've posted. I suspect the issue is going to be in your web application.
– Michael Hampton♦
Jun 8 '13 at 17:42
The application is running just fine under Apache. Is it possible that differences between php backends might be to blame?
– helcim
Jun 8 '13 at 17:46
Consider that nginx does not use .htaccess files. So it could be the case that under Apache a .htaccess was used to modify configuration of php and/or apache modules which are required by your application.
– leepfrog
Jun 8 '13 at 17:52
Do NOT use
location ~ .php$ {
, it is insecure. See nealpoole.com/blog/2011/04/…– NuclearPeon
May 27 '14 at 1:33