-
-
Save stonegao/2366309 to your computer and use it in GitHub Desktop.
Nginx config file to serve static file over POST
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
client_max_body_size 4G; | |
access_log /var/sites/webapp/logs/access.maintenance.log; | |
error_log /var/sites/webapp/logs/error.maintenance.log info; | |
server_name api.webapp.com; | |
# this guy redirects any path to /api.json | |
rewrite ^.*$ /api.json last; | |
location / { | |
root /var/sites/webapp/webapp/; | |
index api.json /api.json; | |
# this is the magic | |
error_page 405 = $uri; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment