国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網站 > Apache > 正文

apache nginx設置目錄無執行權限的方法

2024-08-27 18:22:00
字體:
來源:轉載
供稿:網友

apache nginx設置目錄無執行權限的方法web服務有iis,apache,nginx,使用操作系統無非是windows or *nux

  1. location ~ ^/upload/.*.(php教程|php5)$  
  2. {  
  3. deny all;  

來看倆段通常對上傳目錄設置無權限的列子,配置如下:

  1. <directory "/var/111cn.net/upload"
  2. <filesmatch ".php"
  3. order allow,deny 
  4. deny from all 
  5. </filesmatch> 
  6. </directory> 

*nux就不同了,大家都是知道的*nux操作系統是區分大小寫的

  1. <directory "/var/www/upload"
  2. <filesmatch "(?i:.php)"//?是盡可能多的匹配.php的字符串,i是不區分大小寫,然后冒號后面跟上正則表達式 
  3. order allow,deny 
  4. deny from all 
  5. </filesmatch> 
  6. </directory> 

另外看一一nginx虛擬主機防webshell完美版 nginx.conf

  1. server 
  2. listen 80; 
  3. server_name www.a.com; 
  4. index index.html index.htm index.php; 
  5. root /data/htdocs/www.a.com/; 
  6. #limit_conn crawler 20; 
  7. location ~ .*.(php|php5)?$ 
  8. {  
  9. #fastcgi_pass unix:/tmp/php-cgi.sock; 
  10. fastcgi_pass 127.0.0.1:9000; 
  11. fastcgi_index index.php; 
  12. include fcgi.conf; 
  13. server 
  14. listen 80; 
  15. server_name www.b.com; 
  16. index index.html index.htm index.php; 
  17. root /data/htdocs/m.survivalescaperooms.com/; 
  18. #limit_conn crawler 20; 
  19. location ~ .*.(php|php5)?$ 
  20. {  
  21. #fastcgi_pass unix:/tmp/php-cgi.sock; 
  22. fastcgi_pass 127.0.0.1:9000; 
  23. fastcgi_index index.php; 
  24. include fcgi.conf; 

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 儋州市| 广南县| 即墨市| 永州市| 监利县| 东港市| 石棉县| 林西县| 恩平市| 客服| 汾阳市| 甘泉县| 古浪县| 陇西县| 莱阳市| 新河县| 广丰县| 荃湾区| 孟津县| 阳曲县| 县级市| 慈溪市| 台北县| 齐齐哈尔市| 鄢陵县| 泾川县| 迭部县| 石泉县| 楚雄市| 乌什县| 敦煌市| 长沙县| 保靖县| 东安县| 晋城| 措美县| 道孚县| 温州市| 舟山市| 当涂县| 邓州市|