mod_rewrite to another port , dont work =/

Discussion in 'Apache' started by SergioBZ, Jan 7, 2009.

  1. #1
    Hi guys,

    First of all, nice forum =)

    Lets go, my scenario is:

    Apache:
    2 Dns names:
    www.domain.com
    fv.domain.com


    When i access www.domain.com, i need open a static page, in my /var/www/html folder (root or home folder) and its ok, working fine.

    But when i access fv.domain.com, i want a redirect for a jboss instance, like:
    fv.domain.com:8080/fv/

    I using this following Virtual Directory:


    <VirtualHost fv.domain.com:80>
    servername fv.domain.com
    RewriteEngine on
    RewriteLogLevel 9
    ServerSignature on
    CustomLog /etc/httpd/logs/fv_access.log combined
    ErrorLog /etc/httpd/logs/fv_error.log
    
    RewriteCond %{HTTP_HOST} ^[www\.]*fv.domain.com [NC]
    RewriteCond %{REQUEST_URL} !^/fv/.*
    RewriteRule ^(.*) fv.domain.com:8080/fv/$1 [P,R,L]
    </VirtualHost>
    
    Code (markup):
    but nothing happen.

    The log is created but nothing appear on logs.

    When i access fv.domain.com, apache redirect me to www.domain.com


    Can anyone help me? :confused:
     
    SergioBZ, Jan 7, 2009 IP
  2. norbert

    norbert Guest

    Messages:
    61
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Does the redirect work if you remove all RewriteCond statements ?
     
    norbert, Jan 11, 2009 IP
  3. joebert

    joebert Well-Known Member

    Messages:
    2,150
    Likes Received:
    88
    Best Answers:
    0
    Trophy Points:
    145
    #3
    Looks like you've got max logging turned on, where's the log ?
     
    joebert, Jan 12, 2009 IP