[root@web01 default]# mkdir cron templates
[root@web01 default]# tree
.
├── cron
└── templates directories, files
[root@web01 default]# tree
.
├── cron
│   └── index.html
└── templates
└── index.html directories, files
[root@web01 default]# cat cron/index.html
i am cron
[root@web01 default]# cat templates/index.html
i am templates
[root@web01 default]#
[root@web01 templates]# curl http://192.168.1.24/cron/
i am cron
[root@web01 templates]# curl http://192.168.1.24/templates/
i am templates
[root@web01 templates]# cat /app/server/nginx/conf/rewrite/default.conf
#rewrite ^/index\.html /index.php last;
#if (!-e $request_filename) rewrite ^/(.*)$ index.php last;
#if (!-e $request_filename) {rewrite ^/(.*)$ /index.php last;}
#if (!-e $request_filename) {return 404;}
#if ($http_user_agent ~ Firefox) {rewrite ^(.*)?$ /nginx-Firefox/$1 break;}
#if ($http_user_agent ~ MSIE) {rewrite ^(.*)$ /nginx-MSIE/$1 break;}
#rewrite ^/(\d+)/(.+)/ /$/$ last;
location ~ ^/(cron|templates)/ {deny all;break;}
[root@web01 templates]# curl http://192.168.1.24/cron/
<html>
<head><title> Forbidden</title></head>
<body bgcolor="white">
<center><h1> Forbidden</h1></center>
<hr><center>nginx/1.4.</center>
</body>
</html>
[root@web01 templates]# curl http://192.168.1.24/templates/
<html>
<head><title> Forbidden</title></head>
<body bgcolor="white">
<center><h1> Forbidden</h1></center>
<hr><center>nginx/1.4.</center>
</body>
</html>

最新文章

  1. wpf 悬浮窗口的实现
  2. .cn根服务器被攻击之后
  3. CheckBoxList控件获取多选择,需要遍历
  4. PKU 1003解题
  5. Ubuntu操作系统安装使用教程 (转)
  6. Java 8新特性——default方法(defender方法)介绍
  7. Commando War
  8. XCode环境变量及路径设置
  9. EF Code-First数据迁移的尝试
  10. Netsharp快速入门(之2) 基础档案(之A 创建插件和资源)
  11. 物联网操作系统HelloX已成功移植到MinnowBoard MAX开发板上
  12. WRS是什么?
  13. 进程隐藏与进程保护(SSDT Hook 实现)(一)
  14. HDU_2019——向排序好的数列中插入数
  15. swift 用协议实现代理传值功能
  16. Swift - 操作表(UIActionSheel)的用法,也叫底部警告框
  17. [C#基础] 委托
  18. java代码实现简单的认证——图片验证码形式
  19. loj6070【山东集训第一轮Day4】基因
  20. 011-JDK可视化监控工具-Jstat

热门文章

  1. 《iOS应用逆向工程:分析与实战》
  2. Java设计模式之生产者消费者模式
  3. Windows之权限的继承性 累加性 优先性 交叉性及四项基本原则
  4. ZeroClipboard及其原理介绍
  5. hadoop中InputFormat 接口的设计与实现
  6. 【java web】--css+div总结
  7. (剑指Offer)面试题53:正则表达式匹配
  8. Poj-1274-The Perfect Stall-匈牙利算法
  9. IOS手机使用Fiddler抓获HTTPS报文方法
  10. Linux cmp命令——比较二进制文件(转)