ChinaUnix.net
相关文章推荐:

nginx 配置文件限制访问

连续几天遭遇小规模的cc攻击,虽然危害不大,但每次受到攻击都要登陆到服务器上,把一套措施重新走一遍。一次是晚上11点,一次周六,影响休息,烦人至极。 这几次的cc攻击,应该是来自同一个组织,因为,正巧发现这几次cc攻击在access log中留下的客户端类型都一样 "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; MyIE 3.01)Cache-Control: no-store, must-revalidate" 于是突发奇想,把这个类型的客户端禁止了不就可以了吗...

by yangbosos - Linux文档专区 - 2009-09-25 07:33:48 阅读(734) 回复(0)

相关讨论

apache 下限制某个目录访问很容易的, nginx 下的方法也差不多,只不过大家用的少而已,我简单的总结一下: 根据nginx的文档: QUOTE: ngx_http_access_module This module provides a simple host-based access control. Module ngx_http_access_module makes it possible to control access for specific IP-addresses of clients. Rules are checked in the order of their record to the first match. Example configuration...

by 剑心通明 - BSD文档中心 - 2008-11-04 10:53:17 阅读(2561) 回复(0)

apache下很容易实现,nginx刚测试了一下,不是太熟悉,想实现某个目录只允许某些ip、ip段访问,应该怎么做?

by 剑心通明 - BSD - 2008-07-13 18:38:00 阅读(5244) 回复(7)

配置文件位由编译参数--conf-path指定,这里位于/etc/nginx/目录下. 1. http服务配置文件: user www www; worker_processes 5; error_log /var/nginx/logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; pid /var/nginx/nginx.pid; events { use epoll; worker_connections 1024; } http { include mime.types; default_type application/octet-stream; root /var/ww...

by billianne - Linux文档专区 - 2009-08-25 15:26:36 阅读(1454) 回复(0)

nginx或者apache如何限制某一国家的访问,请问使用什么方法最好?

by lys0212linux - 服务器应用 - 2010-10-08 09:55:10 阅读(2608) 回复(4)

本帖最后由 laihuchun 于 2013-06-19 17:17 编辑 nginx报错 location / { root /usr/local/nginx/html; fastcgi_pass 127.0.0.1:9000; index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } error.log error] 1889#0: *1 FastCGI sent in stderr: "Primary script unkno...

by laihuchun - PHP - 2013-06-21 09:17:07 阅读(1626) 回复(1)

nginx配置说明---------------------------- #运行用户 user nobody nobody; #启动进程 worker_processes 2; #全局错误日志及PID文件 error_log logs/error.log notice; pid logs/nginx.pid; #工作模式及连接数上限 events { use epoll; worker_connections 1024; } #设定http服务器,利用它的反向代理功能提供负载均衡支持 http { #设定mime类型 include conf/mime.types; default_type application/octet-...

by limtzone - Linux文档专区 - 2010-02-03 11:12:21 阅读(1110) 回复(0)

文件: nginx_conf.rar 大小: 0KB 下载: 下载 本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/23251/showart_2043795.html

by linux6 - Linux文档专区 - 2009-09-02 13:08:46 阅读(992) 回复(0)

1.请问nginx配置文件语法在哪里有文档,google过实在找不到 2.判断一个变量值是否为空怎样写 if (-X $http_YYYY) { // 这里的X选项应该是什么? }

by Sam1860 - 服务器应用 - 2008-12-20 18:43:26 阅读(3666) 回复(1)

[code]location /secret/ { auth_basic "Secret Garden."; auth_basic_user_file /home/nginx/conf/authdb; }[/code]如上,我限制了目录的访问,但,如果知道里面的文件名的话,一样可以访问里面的文件,如 /secret/test.php 请问,如何把被限制目录里的文件也限制了啊?:dizzy:

by gnubuntu - 服务器应用 - 2010-03-29 17:55:07 阅读(4843) 回复(7)

本帖最后由 mxiaohua1768 于 2011-10-20 09:04 编辑 attachimg]510774[/attachimg] 现在服务都跑起来了,还是不能访问网页,这咋回事,数据库已导入到mysql里了,我进网站的目录里看了,有index.html和index.php文件~ 我访问时怎么出这个玩意

by mxiaohua1768 - Linux系统管理 - 2011-10-20 09:55:47 阅读(2966) 回复(18)