Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Apr 2005
    Posts
    318

    Default hotlink protection (mod_rewrite) cause apache overload

    This is the htaccess that kill whole apache (server load goes over 120!)

    This htaccess is made by cPanel hotlink protection script.

    Please help. I need hotlink protection on my server. Thx.

    htaccess code:

    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^http://example.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://example.com$ [NC]

    /* here is same RewriteCond as above for 62 domains */

    RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC]
    http://www.crohoster.com/
    quality hosting services and managed dedicated servers

  2. #2
    Member bijo's Avatar
    Join Date
    Aug 2004
    Location
    India
    Posts
    475

    Default

    Quote Originally Posted by MMarko
    This is the htaccess that kill whole apache (server load goes over 120!)

    This htaccess is made by cPanel hotlink protection script.

    Please help. I need hotlink protection on my server. Thx.

    htaccess code:

    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^http://example.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://example.com$ [NC]

    /* here is same RewriteCond as above for 62 domains */

    RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC]
    Hello,

    I think, this .htaccess file has no problem. Is it working on your server?.
    Did you check the apache access and error log?.
    You can find out the exact solution from top and netstat command.
    Please check the apache and mysql usage status from WHM.
    Also check the apache configuration.
    May be it will help you to solve this issue.

    let me know the status.
    Bijo
    Yahoo: "bijo505"
    Msn: "bijo_baby@hotmail.com"
    AIM: "bijobaby"

    http://slashome.com

  3. #3
    Member
    Join Date
    Apr 2005
    Posts
    318

    Default

    Quote Originally Posted by bijo
    Hello,

    I think, this .htaccess file has no problem. Is it working on your server?.
    Did you check the apache access and error log?.
    You can find out the exact solution from top and netstat command.
    Please check the apache and mysql usage status from WHM.
    Also check the apache configuration.
    May be it will help you to solve this issue.

    let me know the status.

    This htaccess is not working obviously. It overloads apache. Netstat is showing normal amount of connections and top is showing that couple httpd process are gone wild.

    Mysql is normal.

    Apache configuration is ok.

    Only (and only on one account!) this htaccess with 62 domain rules overloads it.
    http://www.crohoster.com/
    quality hosting services and managed dedicated servers

  4. #4
    Member
    Join Date
    Apr 2005
    Posts
    318

    Default

    Configuration is setup as above.

    I've noticed something else. When this htaccess file is in /public_html it kills server (ie load goes over 100). When I delete it load is normal about 0.4-0.8.

    The problem is definitely mod_rewrite. I've also posted a problem on mod_rewrite forum. Maybe it's not meant to have 60+ domain rules in one htaccess file.
    http://www.crohoster.com/
    quality hosting services and managed dedicated servers

Similar Threads & Tags
Similar threads

  1. Hotlink protection
    By ultramagna in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 03-11-2005, 09:58 PM
  2. HotLink protection
    By kardukov in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 10-17-2003, 01:07 AM
  3. Apache 1.3.28 and mod_rewrite don't accept hotlink protection
    By pagedeveloping in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 07-22-2003, 06:00 PM
  4. Hotlink Protection
    By kennyv36 in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 07-12-2003, 09:07 PM
  5. Hotlink Protection
    By Aerosmith in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 01-21-2003, 06:48 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube