Results 1 to 4 of 4

Thread: understanding mod_rewrite for apache

  1. #1
    Join Date
    Jun 2011
    Beans
    6

    understanding mod_rewrite for apache

    hello. after reading several articles about mod_rewrite or reverse proxying im still really confused about it. given the fact im still learning about server administration.

    to simply explain my situation, i have this webserver, and this server contains 1 website only which can be accessed by
    http://<some ip>/website

    i gave this website to some security dept. for vulnerability scanning and was told that i need to configure my mod_rewrite rules. my question is how?

    he gave me a document exactly similar to this http://seclists.org/fulldisclosure/2011/Oct/232

    the document suggests to apply a patch http://www.apache.org/dist/httpd/pat...ply_to_2.2.21/

    currently my apache version is :
    Code:
    Server version: Apache/2.2.22 (Ubuntu)
    Server built:   Mar  8 2013 15:53:09
    
    or update configuration to something like

    Code:
    RewriteRule /(.*)\.(jpg|gif|png)    http://images.example.com/$1.$2 [P]
    im assuming, since im using the 2.2.22, patch seems to be unnecessary anymore which leaves me to the configuration.

    where and how do i change my RewriteRules
    Last edited by pedenski; February 11th, 2014 at 07:41 AM. Reason: edit for clarity

  2. #2
    Join Date
    Nov 2008
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: apache - secure reverse proxying

    moved to security discussions
    Ubuntu Forums Moderation Staff || SandyDNET
    Twitter: @CatchesAStar | Last.fm
    So don't be ashamed to wear your crown, you're a king you're a queen inside and out

  3. #3
    Join Date
    Feb 2014
    Beans
    58

    Re: understanding mod_rewrite for apache

    I havn't played around with apache enough recently to know exactly where your 'rewrite rules' are located, but you can find them yourself with
    Code:
    $ find /etc/apache -type f -exec grep -l -i 'RewriteRule' '{}' \;
    This will list all of the files that are in your /etc/apache directory that contain the word 'RewriteRule'. Its probably gonna be in some directory named 'sites-available'. Its at least a start on how to fix your problem.

  4. #4

    Re: understanding mod_rewrite for apache

    As I have answered this very question on another forum, if my answer is inadequate, or incorrect, I would appreciate knowing that it is deficient in any regard.
    I take my fung.fu seriously.

    Or.... you could just be "fact checking" my answer? Which I got from here...
    shellshock.conf for fail2ban - Tested on fail2ban 0.8.10

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •