nginx
共 6 篇文章
nginx 405 Not Allowed
这个错误的原因是:Apache、IIS、Nginx等绝大多数web服务器,都不允许静态文件响应POST请求,否则会返回“HTTP/1.1 405 Method not allowed”错误。 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; } }
2013-04-07 22:41 · nginx · nginx · 405
Nginx 非 root 用户下启动 HTTP 80 端口
chown root:root nginx chmod 755 nginx chmod u+s nginx
2012-12-09 21:52 · linux · nginx · centos · nginx · root · 80端口
nginx405问题(post/get方法)
使用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; }
2011-10-16 16:21 · nginx · nginx · post · 405
nginx过滤日志
location ~ .*.(js|jpg|JPG|jpeg|JPEG|css|bmp|gif|GIF)$ { access_log off; }
2011-10-16 16:15 · nginx · nginx · 过滤 · access.log
nginx alias与root的区别
看例子: location ~ ^/awstats/ { root /home/awstats/; 访问:http://test.com/awstats/ 实际访问的是/home/awstats/awstats/ location ~ ^/awstats/ { alias /home/ 访问:http://test.com/awstats/ 实际访问的是/home/
2011-10-13 12:05 · nginx · nginx · alias · root