ITeye博客

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

如何调试Nginx

如果需要调试Nginx,你需要增加--with-debug选项重新编译一个Nginx,同时,nginx.conf如下配置: error_log logs/error.log debug; # 只记录调试日志 master_process off; # 简化调试 此指令不得用于生产环境 daemon off; # 简化调试 此指令可以用到生产环境

2011-10-13 11:58 · nginx · nginx · debug