
nginx
kawayime
这个作者很懒,什么都没留下…
展开
-
如何调试Nginx
如果需要调试Nginx,你需要增加--with-debug选项重新编译一个Nginx,同时,nginx.conf如下配置: error_log logs/error.log debug; # 只记录调试日志 master_process off; # 简化调试 此指令不得用于生产环境 daemon off; # 简化调试 此指令可以用到生产环...原创 2011-10-13 11:58:27 · 221 阅读 · 0 评论 -
nginx alias与root的区别
看例子:1. location ~ ^/awstats/ { root /home/awstats/;访问:http://test.com/awstats/ 实际访问的是/home/awstats/awstats/ 2. location ~ ^/awstats/ { alias /home/访问:http://tes...原创 2011-10-13 12:05:49 · 119 阅读 · 0 评论 -
nginx过滤日志
location ~ .*\.(js|jpg|JPG|jpeg|JPEG|css|bmp|gif|GIF)${ access_log off;}原创 2011-10-16 16:15:16 · 264 阅读 · 0 评论 -
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:/...原创 2011-10-16 16:21:48 · 417 阅读 · 0 评论 -
nginx 405 Not Allowed
这个错误的原因是:Apache、IIS、Nginx等绝大多数web服务器,都不允许静态文件响应POST请求,否则会返回“HTTP/1.1 405 Method not allowed”错误。 [code="java"]upstream static_backend { server localhost:80;}server { listen 80; ...原创 2013-04-07 22:41:08 · 574 阅读 · 0 评论 -
Nginx 非 root 用户下启动 HTTP 80 端口
chown root:root nginx chmod 755 nginx chmod u+s nginx原创 2012-12-09 21:52:40 · 578 阅读 · 0 评论