Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

关于apache2.2 的防盗连修改失效

[复制链接]
Sv 发表于 2008-5-31 19:59:25 | 显示全部楼层 |阅读模式
https://discuz.dismall.com/viewth ... p;extra=&page=1

很久以前跟着这篇文章修改
的确是有效的
当初好像是用apache1.x/2.0的版本
因为只要修改httpd.conf就行了

可是现今再接触一下
用的是apache2.2的版本
也跟着修改httpd-vhost.conf
却没有效了………

请教一下各位大哥应如何修改才有效??
谢谢
  1. #
  2. # Virtual Hosts
  3. #
  4. # If you want to maintain multiple domains/hostnames on your
  5. # machine you can setup VirtualHost containers for them. Most configurations
  6. # use only name-based virtual hosts so the server doesn't need to worry about
  7. # IP addresses. This is indicated by the asterisks in the directives below.
  8. #
  9. # Please see the documentation at
  10. # <URL:http://httpd.apache.org/docs/2.2/vhosts/>
  11. # for further details before you try to setup virtual hosts.
  12. #
  13. # You may use the command line option '-S' to verify your virtual host
  14. # configuration.

  15. #
  16. # Use name-based virtual hosting.
  17. #
  18. NameVirtualHost *:8080

  19. #
  20. # VirtualHost example:
  21. # Almost any Apache directive may go into a VirtualHost container.
  22. # The first VirtualHost section is used for all requests that do not
  23. # match a ServerName or ServerAlias in any <VirtualHost> block.
  24. #
  25. <VirtualHost *:80>
  26.     ServerAdmin webmaster@dummy-host.x
  27.     DocumentRoot "C:/Apache2.2/docs/dummy-host.x"
  28.     ServerName dummy-host.x
  29.     ServerAlias www.dummy-host.x
  30.     ErrorLog "logs/dummy-host.x-error.log"
  31.     CustomLog "logs/dummy-host.x-access.log" common
  32. </VirtualHost>

  33. <VirtualHost *:80>
  34.     ServerAdmin webmaster@dummy-host2.x
  35.     DocumentRoot "C:/Apache2.2/docs/dummy-host2.x"
  36.     ServerName dummy-host2.x
  37.     ErrorLog "logs/dummy-host2.x-error.log"
  38.     CustomLog "logs/dummy-host2.x-access.log" common
  39. </VirtualHost>


  40. <VirtualHost *:8080>
  41.     DocumentRoot F:/AppServ/www
  42.     ServerName fish.no-ip.org
  43.     SetEnvIfNoCase Referer "^http://fish.no-ip.org:8080" local_ref=1
  44.     SetEnvIfNoCase Referer "^http://fish.no-ip.org:8080" local_ref=1
  45.     <FilesMatch "\.(txt|doc|mp3|zip|rar|jpg|gif)">
  46.        Order Allow,Deny
  47.        Allow from env=local_ref
  48.    </FilesMatch>
  49.    <IfModule mod_rewrite.c>
  50.     RewriteEngine On
  51.     RewriteRule ^/supesite/([0-9]+)/spacelist(.*)$ /supesite/index.php?$1/action_spacelist$2
  52.     RewriteRule ^/supesite/([0-9]+)/viewspace_(.+)$ /supesite/index.php?$1/action_viewspace_itemid_$2
  53.     RewriteRule ^/supesite/([0-9]+)/viewbbs_(.+)$ /supesite/index.php?$1/action_viewbbs_tid_$2
  54.     RewriteRule ^/supesite/([0-9]+)/(.*)$ /supesite/index.php?$1/$2
  55.     RewriteRule ^/supesite/([0-9]+)$ /supesite/index.php?$1
  56.     RewriteRule ^/supesite/action_(.+)$ /supesite/index.php?action_$1
  57.     RewriteRule ^/supesite/category_(.+)$ /supesite/index.php?action_category_catid_$1
  58.     RewriteRule ^/supesite/itemlist_(.+)$ /supesite/index.php?action_itemlist_catid_$1
  59.     RewriteRule ^/supesite/viewnews_(.+)$ /supesite/index.php?action_viewnews_itemid_$1
  60.     RewriteRule ^/supesite/viewthread_(.+)$ /supesite/index.php?action_viewthread_tid_$1
  61.     RewriteRule ^/supesite/index([\.a-zA-Z0-9]*)$ /supesite/index.php
  62. </IfModule>
  63. #    ErrorLog logs/dummy-host.example.com-error_log
  64. #    CustomLog logs/dummy-host.example.com-access_log common
  65. </VirtualHost>
复制代码

[ 本帖最后由 Sv 于 2008-5-31 20:46 编辑 ]
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-11-19 08:22 , Processed in 0.020989 second(s), 4 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表