How to secure website with htaccess or a script?

Discussion in 'Security' started by cristovideos, Jun 20, 2010.

  1. #1
    I want to know if is possible make a secured site with some code in the htaccess or some scripts.Someone is trying to put a virus in my site,when I scaning my site with the server antivirus I detect a exploit.
     
    cristovideos, Jun 20, 2010 IP
  2. madaboutlinux

    madaboutlinux Member

    Messages:
    250
    Likes Received:
    7
    Best Answers:
    2
    Trophy Points:
    43
    #2
    Is it a Linux OR a Windows server? BTW, can you paste the scanning report here so people here can identify what exactly it is?
     
    madaboutlinux, Jun 20, 2010 IP
  3. nikb

    nikb Peon

    Messages:
    93
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    No. That is not a solution to secure bad coded things with something.
     
    nikb, Jun 27, 2010 IP
  4. hans

    hans Well-Known Member

    Messages:
    2,923
    Likes Received:
    126
    Best Answers:
    1
    Trophy Points:
    173
    #4
    a site should never be secured in .htaccess
    but security problems should be FIXED in the software that has known security issues
    in addition security problems arise from incompetent server / web site configurations, wrong permissions etc
    again secure your entire server/web space !

    then when all scripts and SW is properly secured and fixed
    deny access to any admin area or config scripts - either in your default server config or by htaccess

    and after all above
    install mod_security and snort
    to secure a properly configured and secured system

    never bypass the work of cleaning up security holes by htaccess. that would be comparable to the current oilspill situation in the gulf
    patching mistakes is no solution
    permanently solving mistakes at the original source is the solution

    Google for each installed SW package or script you have running on your server

    security vulnerabilities nameofyourSWhere

    that may give you a list of patches if you have SW with security issues
    then fix all
    then secure as a.m.
     
    hans, Jun 30, 2010 IP
  5. admindiary.com

    admindiary.com Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    It is not possible to secure the server with a htaccess file. You can use bash script to harden your server.
     
    admindiary.com, Sep 3, 2010 IP
  6. Grimmfang

    Grimmfang Member

    Messages:
    191
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    30
    #6
    I highly recommend downloading ZBblock a PHP based site security program, i've used it for a while now and really like it.
     
    Grimmfang, Sep 11, 2010 IP