Results 1 to 3 of 3

Thread: Proper way to block Referer Spam in .httpd by keyword

  1. #1
    Registered User
    Join Date
    May 2012
    Posts
    4
    cPanel Access Level

    Website Owner

    Default Proper way to block Referer Spam in .httpd by keyword

    I am being plagued by referrer spam that is spoofing as Goodle and am tired of playing whack-a-mole with the IPs so instead would like to block any referals that contain the phrase

    Article Dashboard

    regardless who it is from for all sites.

    Will this do it:?


    <Directory "/home/*/public_html">
    setenvifnocase referer "^http://.*(Article Dashboard)" spam_ref=1
    Order Allow,Deny
    Allow from all
    Deny from env=spam_ref
    </Directory>

    And is it the proper syntax to include in httpd.conf via

    Pre VirtualHost Include in WHM

    Thanks much.

  2. #2
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    7,611
    cPanel Access Level

    Root Administrator

    Default Re: Proper way to block Referer Spam in .httpd by keyword

    Do you have mod_security installed? You might instead consider using mod_security for restricting these type of access. Here's a guide on using mod_security for this type of block:

    Stopping Comment / Referrer Spam
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Technical Analyst III, Forums Specialist, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  3. #3
    Registered User
    Join Date
    May 2012
    Posts
    4
    cPanel Access Level

    Website Owner

    Default Re: Proper way to block Referer Spam in .httpd by keyword

    Thanks for the suggestion. Apparently mod_security is not installed but that can probably be done.

    In the meantime, do you know

    Can mod_security be used in httpd.conf so I don't have to update all the .htaccess files?
    Does mod_security handle phrases as well as single words- the docs are not clear on that?
    Will my original scenario work?

    Thanks much.

Similar Threads

  1. block spam
    By tiff2342 in forum E-mail Discussions
    Replies: 2
    Last Post: 12-05-2012, 01:21 PM
  2. Replies: 4
    Last Post: 04-01-2012, 12:48 PM
  3. Correct way to block bad bots in httpd.conf?
    By kokopelli in forum Security
    Replies: 7
    Last Post: 11-09-2011, 07:28 AM
  4. DDoS using Iframe. How to block their referer ?
    By NgocChinh in forum General Discussion
    Replies: 1
    Last Post: 02-08-2008, 04:53 AM
  5. how to block spam from localhost ?
    By youp in forum General Discussion
    Replies: 1
    Last Post: 09-01-2006, 05:40 AM
bargain