---
title: "nginx405问题(post/get方法)"
author: "chembo"
date: "2011-10-16T16:21:48Z"
tags: ["405", "nginx", "post"]
categories: ["开源软件"]
slug: "nginx405-post-get"
draft: false
lastmod: "2011-10-16T16:21:48Z"
id: 1197774
url: "https://chembo.iteye.com/blog/1197774"
---

使用nginx作web服务器时，如果前端通过post方法去取一个静态文件时常常会出现405的结果。
解决办法：
location ~ /gjp-oss/(images|css|js|modules|flash|html)/ {
                root /app_data/static/;
                error_page 405 =200 http://$host$request_uri;
        }