You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Rajkumar s <ra...@gmail.com> on 2005/03/12 21:03:44 UTC

[users@httpd] Clarification on RewriteRule

Dear sir,
            I need to rewrite an url, From one of our server i got
this VirtualHost information , can anyone explain me what this
RewriteRule implies.

<VirtualHost 203.199.69.181>
ServerName rosaonline.org
RewriteEngine On
RewriteLog "/usr/local/apache/logs/rewrite.log"
RewriteLogLevel 0
ProxyPass  rotaryindia.net  http://203.199.69.181:8080/
RewriteRule ^/(.*) http://127.0.0.1:8080/VirtualHostBase/http/rosaonline.org:80/
ROSA/VirtualHostRoot/$1 [P,L]
</VirtualHost>

When i enter "rosaonline.org" in the browser ,it's getting rewritten

My Task is that when i enter the url www.whatsonchennai.com in the
browser , the url should be rewritten by displaying the contents of
www.whatsonchennai.com:8080/ , but it should inturn return the display
the url as www.whatsonchennai.com.

Kindly help me out , i can't understand the examples from url rewriting guide.

Will this above rule can be modified to achieve this task. It's very Urgent.

Thanks in Advance,

Sincerely,
S.Rajkumar

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Clarification on RewriteRule

Posted by Rajkumar s <ra...@gmail.com>.
Dear sir,
          Sorry to disturb you once again , it finally worked after
including the submodules using

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so

Thanks a lot for your guidance and kind support . 

Sincerely,
S.Rajkumar


On Mon, 14 Mar 2005 05:04:56 -0800, Rajkumar s <ra...@gmail.com> wrote:
> Dear sir,
>          From the documentation given by you , i found the modules
> related to proxy are
> 
> 1. mod_proxy
> 2. mod_proxy_connect
> 3. mod_proxy_ftp
> 4. mod_proxy_http
> 
> While compiling Apache 2.0.53 , i had compiled with options
> 
> compile --enable-proxy=shared
> 
> On doing this all the remaining modules will also gets included
> automatically (mod_proxy_connect,mod_proxy_ftp,mod_proxy_http)
> 
> I could find the following .so files in modules directory
> 
> mod_proxy_ftp.so   mod_proxy.so
> mod_proxy_connect.so  mod_proxy_http.so
> 
> In the httpd.conf , i had included the module as shown below
> 
> LoadModule proxy_module   modules/mod_proxy.so
> 
> Do i need to include the sub modules specifically ?
> If so , how do i include it.
> 
> Sincerely,
> S.Rajkumar
> 
> On Sun, 13 Mar 2005 15:21:31 -0500, Noah <si...@onastick.net> wrote:
> > On Mon, Mar 14, 2005 at 01:40:05AM +0530, Rajkumar s wrote:
> >
> > > I had included the ProxyPass and ProxyPassReverse as given by you,
> > >
> > > <VirtualHost 203.199.200.129>
> > > ServerName www.whatsonchennai.com
> > > ProxyPass / http://www.whatsonchennai.com:8080/
> > > ProxyPassReverse / http://www.whatsonchennai.com:8080/
> > > </VirtualHost>
> > >
> > > But i got the error message as "403 Forbidden
> > > You don't have permission to access / on this server.".
> > >
> > > so i verified error_log and found these messages
> > >
> > > [Mon Mar 14 01:31:56 2005] [warn] proxy: No protocol handler was valid
> > > for the URL /. If you are using a DSO version of mod_proxy, make sure
> > > the proxy submodules are included in the configuration using
> > > LoadModule.
> > > [Mon Mar 14 01:31:57 2005] [warn] proxy: No protocol handler was valid
> > > for the URL /favicon.ico. If you are using a DSO version of mod_proxy,
> > > make sure the proxy submodules are included in the configuration using
> > > LoadModule.
> >
> > That error isn't complaining about the lack of mod_proxy in your config;
> > note the use of the phrase 'mod_proxy submodules'. RTFM at
> > http://httpd.apache.org/docs-2.0/mod/mod_proxy.html
> >
> >
> > >     I think i donot need ProxyPass for this task because all i have to
> > > do is that when i enter the url www.whatsonchennai.com it should
> > > display contents corresponding to "www.whatsonchennai.com:8080/ , but
> > > it should show up only the url what i originally typed in ie
> > > "www.whatsonchennai.com".
> >
> > If this is all you need done, the ProxyPass/ProxyPassReverse directives
> > supplied above should be sufficient (although in this simple case, I'd
> > suggest running the '8080' server on localhost,  unless there's an
> > overriding reason not to). If you need to support Zope's VHM, I'd follow
> > the docs on their site for that. Sorry, I'm not a Zope guy. =)
> >
> > --n
> >
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Clarification on RewriteRule

Posted by Rajkumar s <ra...@gmail.com>.
Dear sir,
         From the documentation given by you , i found the modules
related to proxy are

1. mod_proxy
2. mod_proxy_connect
3. mod_proxy_ftp
4. mod_proxy_http

While compiling Apache 2.0.53 , i had compiled with options

compile --enable-proxy=shared 

On doing this all the remaining modules will also gets included
automatically (mod_proxy_connect,mod_proxy_ftp,mod_proxy_http)

I could find the following .so files in modules directory 

mod_proxy_ftp.so   mod_proxy.so
mod_proxy_connect.so  mod_proxy_http.so  

In the httpd.conf , i had included the module as shown below

LoadModule proxy_module   modules/mod_proxy.so

Do i need to include the sub modules specifically ? 
If so , how do i include it.

Sincerely,
S.Rajkumar

On Sun, 13 Mar 2005 15:21:31 -0500, Noah <si...@onastick.net> wrote:
> On Mon, Mar 14, 2005 at 01:40:05AM +0530, Rajkumar s wrote:
> 
> > I had included the ProxyPass and ProxyPassReverse as given by you,
> >
> > <VirtualHost 203.199.200.129>
> > ServerName www.whatsonchennai.com
> > ProxyPass / http://www.whatsonchennai.com:8080/
> > ProxyPassReverse / http://www.whatsonchennai.com:8080/
> > </VirtualHost>
> >
> > But i got the error message as "403 Forbidden
> > You don't have permission to access / on this server.".
> >
> > so i verified error_log and found these messages
> >
> > [Mon Mar 14 01:31:56 2005] [warn] proxy: No protocol handler was valid
> > for the URL /. If you are using a DSO version of mod_proxy, make sure
> > the proxy submodules are included in the configuration using
> > LoadModule.
> > [Mon Mar 14 01:31:57 2005] [warn] proxy: No protocol handler was valid
> > for the URL /favicon.ico. If you are using a DSO version of mod_proxy,
> > make sure the proxy submodules are included in the configuration using
> > LoadModule.
> 
> That error isn't complaining about the lack of mod_proxy in your config;
> note the use of the phrase 'mod_proxy submodules'. RTFM at
> http://httpd.apache.org/docs-2.0/mod/mod_proxy.html
> 
> 
> >     I think i donot need ProxyPass for this task because all i have to
> > do is that when i enter the url www.whatsonchennai.com it should
> > display contents corresponding to "www.whatsonchennai.com:8080/ , but
> > it should show up only the url what i originally typed in ie
> > "www.whatsonchennai.com".
> 
> If this is all you need done, the ProxyPass/ProxyPassReverse directives
> supplied above should be sufficient (although in this simple case, I'd
> suggest running the '8080' server on localhost,  unless there's an
> overriding reason not to). If you need to support Zope's VHM, I'd follow
> the docs on their site for that. Sorry, I'm not a Zope guy. =)
> 
> --n
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Clarification on RewriteRule

Posted by Noah <si...@onastick.net>.
On Mon, Mar 14, 2005 at 01:40:05AM +0530, Rajkumar s wrote:

> I had included the ProxyPass and ProxyPassReverse as given by you,
> 
> <VirtualHost 203.199.200.129>
> ServerName www.whatsonchennai.com
> ProxyPass / http://www.whatsonchennai.com:8080/
> ProxyPassReverse / http://www.whatsonchennai.com:8080/
> </VirtualHost>
> 
> But i got the error message as "403 Forbidden
> You don't have permission to access / on this server.".
> 
> so i verified error_log and found these messages
> 
> [Mon Mar 14 01:31:56 2005] [warn] proxy: No protocol handler was valid
> for the URL /. If you are using a DSO version of mod_proxy, make sure
> the proxy submodules are included in the configuration using
> LoadModule.
> [Mon Mar 14 01:31:57 2005] [warn] proxy: No protocol handler was valid
> for the URL /favicon.ico. If you are using a DSO version of mod_proxy,
> make sure the proxy submodules are included in the configuration using
> LoadModule.

That error isn't complaining about the lack of mod_proxy in your config;
note the use of the phrase 'mod_proxy submodules'. RTFM at
http://httpd.apache.org/docs-2.0/mod/mod_proxy.html


>     I think i donot need ProxyPass for this task because all i have to
> do is that when i enter the url www.whatsonchennai.com it should
> display contents corresponding to "www.whatsonchennai.com:8080/ , but
> it should show up only the url what i originally typed in ie
> "www.whatsonchennai.com".

If this is all you need done, the ProxyPass/ProxyPassReverse directives
supplied above should be sufficient (although in this simple case, I'd 
suggest running the '8080' server on localhost,  unless there's an 
overriding reason not to). If you need to support Zope's VHM, I'd follow 
the docs on their site for that. Sorry, I'm not a Zope guy. =)

--n

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Clarification on RewriteRule

Posted by Rajkumar s <ra...@gmail.com>.
Dear sir,

I had included the ProxyPass and ProxyPassReverse as given by you,

<VirtualHost 203.199.200.129>
ServerName www.whatsonchennai.com
ProxyPass / http://www.whatsonchennai.com:8080/
ProxyPassReverse / http://www.whatsonchennai.com:8080/
</VirtualHost>

But i got the error message as "403 Forbidden
You don't have permission to access / on this server.".

so i verified error_log and found these messages

[Mon Mar 14 01:31:56 2005] [warn] proxy: No protocol handler was valid
for the URL /. If you are using a DSO version of mod_proxy, make sure
the proxy submodules are included in the configuration using
LoadModule.
[Mon Mar 14 01:31:57 2005] [warn] proxy: No protocol handler was valid
for the URL /favicon.ico. If you are using a DSO version of mod_proxy,
make sure the proxy submodules are included in the configuration using
LoadModule.

But i had configured apache 2 with mod_proxy module as dynamic
loadable module and also had included this in httpd.conf.

LoadModule proxy_module   modules/mod_proxy.so

Do anything needs to be included other than this to rectify this error.
       
    I think i donot need ProxyPass for this task because all i have to
do is that when i enter the url www.whatsonchennai.com it should
display contents corresponding to "www.whatsonchennai.com:8080/ , but
it should show up only the url what i originally typed in ie
"www.whatsonchennai.com".

In the first mail i had given the contents for rewriting an url which
i found in one of our servers. You can find the explanation for the
RewriteRule from the url:
http://plone.org/documentation/tutorial/plone-apache/vhm

Sorry for troubling you

Sincerely,
S.Rajkumar


On Sun, 13 Mar 2005 14:00:36 -0500, Noah <si...@onastick.net> wrote:
> On Sun, Mar 13, 2005 at 02:14:46PM +0530, Rajkumar s wrote:
> > Dear sir,
> >        I had set the RewriteLogLevel to '9' , But the previous rule
> > haven't worked ,so i modified the rule as
> >
> > <VirtualHost 203.199.200.129>
> > #DocumentRoot /home/domains/whatsonchennai.com/Webdir
> > ServerName www.whatsonchennai.com
> > RewriteEngine on
> > RewriteLog "/var/log/apache/rewrite.log"
> > RewriteLogLevel 9
> > RewriteRule ^/(.*) http://www.whatsonchennai.com:8080/
> > </VirtualHost>
> >
> > On applying this rule the thing is getting redirected , ie when i
> > enter the url "www.whatsonchennai.com" it's getting redirected
> > to "www.whatsonchennai.com:8080". But again i find that the url in
> > browsers address bar appears as "www.whatsonchennai.com:8080" but it
> > should instead show up only "www.whatsonchennai.com".
> >
> > Rewrite logs are provided below:
> 
> [snip]
> 
> (note: someone check me on this; I /think/ I have it right, but my
> Proxy-fu isn't as strong as I'd like)
> 
> The RewriteLogs you have provided are for a violently different
> configuration than you posted in your first email. In *this* posting,
> you're issuing a 302 redirect to http://www.whatsonchennai.com:8080/
> (note that lack of a [P,L] in your RewriteRule; the 'P' is required for
> Proxying; RTFM at http://httpd.apache.org/docs/mod/mod_rewrite.html#RewriteRule).
> If the goal is to keep the ':8080'-style URLs from being seen by the end user,
> a Proxy-style setup will be required. Note also that the above example
> could be written as:
> 
> <VirtualHost 203.199.200.129>
>         #DocumentRoot /home/domains/whatsonchennai.com/Webdir
>         ServerName www.whatsonchennai.com
>         ProxyPass / http://www.whatsonchennai.com:8080/
>         ProxyPassReverse / http://www.whatsonchennai.com:8080/
> </VirtualHost>
> 
> No mod_rewrite needed. =)
> 
> In your first posting, you had:
> 
> > <VirtualHost 203.199.69.181>
> > ServerName rosaonline.org
> > RewriteEngine On
> > RewriteLog "/usr/local/apache/logs/rewrite.log"
> > RewriteLogLevel 0
> > ProxyPass  rotaryindia.net  http://203.199.69.181:8080/
> > RewriteRule ^/(.*) http://127.0.0.1:8080/VirtualHostBase/http/rosaonline.org:80/ROSA/VirtualHostRoot/$1 [P,L]
> > </VirtualHost>
> 
> This does two things:
> 
> 1) Any request like this:
>     GET rotaryindia.net HTTP/1.0
>     Host: rosaonline.org
> 
> ...would get proxyed to http://203.199.69.181:8080/. The user would see
> whatever they had typed into their browser, Apache would make an
> outbound HTTP request to http://203.199.69.181:8080/, and return the
> contents of that request. Note that anything in the request path after
> 'rotaryindia.net' would get mapped to the target URL, so:
> 
>     GET rotaryindia.net/foo/bar/baz.html HTTP/1.0
>     Host: rosaonline.org
> 
> ...would result in Apache fetching the content from
> http://203.199.69.181:8080/foo/bar/baz.html.
> 
> 2) The RewriteRule portion doesn't do anything all that fancy; it simply
> Rewrites any request to an outbound request to 127.0.0.1:8080, so that a
> request which looks like this:
> 
> GET /foo/bar/baz.html HTTP/1.0
> Host: rosaonline.org
> 
> ...becomes a Proxy request to
> http://127.0.0.1:8080/VirtualHostBase/http/rosaonline.org:80/ROSA/VirtualHostRoot/foo/bar/baz.html
> 
> --n
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Clarification on RewriteRule

Posted by Noah <si...@onastick.net>.
On Sun, Mar 13, 2005 at 02:14:46PM +0530, Rajkumar s wrote:
> Dear sir,
>        I had set the RewriteLogLevel to '9' , But the previous rule
> haven't worked ,so i modified the rule as
> 
> <VirtualHost 203.199.200.129>
> #DocumentRoot /home/domains/whatsonchennai.com/Webdir
> ServerName www.whatsonchennai.com
> RewriteEngine on
> RewriteLog "/var/log/apache/rewrite.log"
> RewriteLogLevel 9
> RewriteRule ^/(.*) http://www.whatsonchennai.com:8080/  
> </VirtualHost>
> 
> On applying this rule the thing is getting redirected , ie when i
> enter the url "www.whatsonchennai.com" it's getting redirected
> to "www.whatsonchennai.com:8080". But again i find that the url in
> browsers address bar appears as "www.whatsonchennai.com:8080" but it
> should instead show up only "www.whatsonchennai.com".
> 
> Rewrite logs are provided below:

[snip]

(note: someone check me on this; I /think/ I have it right, but my
Proxy-fu isn't as strong as I'd like)

The RewriteLogs you have provided are for a violently different
configuration than you posted in your first email. In *this* posting,
you're issuing a 302 redirect to http://www.whatsonchennai.com:8080/
(note that lack of a [P,L] in your RewriteRule; the 'P' is required for
Proxying; RTFM at http://httpd.apache.org/docs/mod/mod_rewrite.html#RewriteRule). 
If the goal is to keep the ':8080'-style URLs from being seen by the end user,
a Proxy-style setup will be required. Note also that the above example
could be written as:

<VirtualHost 203.199.200.129>
	#DocumentRoot /home/domains/whatsonchennai.com/Webdir
	ServerName www.whatsonchennai.com
	ProxyPass / http://www.whatsonchennai.com:8080/
	ProxyPassReverse / http://www.whatsonchennai.com:8080/
</VirtualHost>

No mod_rewrite needed. =)

In your first posting, you had:

> <VirtualHost 203.199.69.181>
> ServerName rosaonline.org
> RewriteEngine On
> RewriteLog "/usr/local/apache/logs/rewrite.log"
> RewriteLogLevel 0
> ProxyPass  rotaryindia.net  http://203.199.69.181:8080/
> RewriteRule ^/(.*) http://127.0.0.1:8080/VirtualHostBase/http/rosaonline.org:80/ROSA/VirtualHostRoot/$1 [P,L]
> </VirtualHost>

This does two things:

1) Any request like this:
    GET rotaryindia.net HTTP/1.0
    Host: rosaonline.org

...would get proxyed to http://203.199.69.181:8080/. The user would see
whatever they had typed into their browser, Apache would make an
outbound HTTP request to http://203.199.69.181:8080/, and return the
contents of that request. Note that anything in the request path after
'rotaryindia.net' would get mapped to the target URL, so:

    GET rotaryindia.net/foo/bar/baz.html HTTP/1.0
    Host: rosaonline.org

...would result in Apache fetching the content from
http://203.199.69.181:8080/foo/bar/baz.html.


2) The RewriteRule portion doesn't do anything all that fancy; it simply
Rewrites any request to an outbound request to 127.0.0.1:8080, so that a
request which looks like this:

GET /foo/bar/baz.html HTTP/1.0
Host: rosaonline.org

...becomes a Proxy request to
http://127.0.0.1:8080/VirtualHostBase/http/rosaonline.org:80/ROSA/VirtualHostRoot/foo/bar/baz.html

--n

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Clarification on RewriteRule

Posted by Rajkumar s <ra...@gmail.com>.
Dear sir,
       I had set the RewriteLogLevel to '9' , But the previous rule
haven't worked ,so i modified the rule as

<VirtualHost 203.199.200.129>
#DocumentRoot /home/domains/whatsonchennai.com/Webdir
ServerName www.whatsonchennai.com
RewriteEngine on
RewriteLog "/var/log/apache/rewrite.log"
RewriteLogLevel 9
RewriteRule ^/(.*) http://www.whatsonchennai.com:8080/  
</VirtualHost>

On applying this rule the thing is getting redirected , ie when i
enter the url "www.whatsonchennai.com" it's getting redirected
to "www.whatsonchennai.com:8080". But again i find that the url in
browsers address bar appears as "www.whatsonchennai.com:8080" but it
should instead show up only "www.whatsonchennai.com".

Rewrite logs are provided below:

210.214.6.141 - - [13/Mar/2005:14:03:30 +051800]
[www.whatsonchennai.com/sid#80e0080][rid#8170fe8/initial] (2) init
rewrite engine with requested uri /
210.214.6.141 - - [13/Mar/2005:14:03:30 +051800]
[www.whatsonchennai.com/sid#80e0080][rid#8170fe8/initial] (3) applying
pattern '^/(.*)' to uri '/'
210.214.6.141 - - [13/Mar/2005:14:03:30 +051800]
[www.whatsonchennai.com/sid#80e0080][rid#8170fe8/initial] (2) rewrite
/ -> http://www.whatsonchennai.com:8080/
210.214.6.141 - - [13/Mar/2005:14:03:30 +051800]
[www.whatsonchennai.com/sid#80e0080][rid#8170fe8/initial] (2)
implicitly forcing redirect (rc=302) with
http://www.whatsonchennai.com:8080/
210.214.6.141 - - [13/Mar/2005:14:03:30 +051800]
[www.whatsonchennai.com/sid#80e0080][rid#8170fe8/initial] (1) escaping
http://www.whatsonchennai.com:8080/ for redirect
210.214.6.141 - - [13/Mar/2005:14:03:30 +051800]
[www.whatsonchennai.com/sid#80e0080][rid#8170fe8/initial] (1) redirect
to http://www.whatsonchennai.com:8080/ [REDIRECT/302]

Sincerely,
S.Rajkumar


On Sat, 12 Mar 2005 15:15:42 -0500, Noah <si...@onastick.net> wrote:
> On Sun, Mar 13, 2005 at 01:33:44AM +0530, Rajkumar s wrote:
> > Dear sir,
> >             I need to rewrite an url, From one of our server i got
> > this VirtualHost information , can anyone explain me what this
> > RewriteRule implies.
> >
> > <VirtualHost 203.199.69.181>
> > ServerName rosaonline.org
> > RewriteEngine On
> > RewriteLog "/usr/local/apache/logs/rewrite.log"
> > RewriteLogLevel 0
> > ProxyPass  rotaryindia.net  http://203.199.69.181:8080/
> > RewriteRule ^/(.*) http://127.0.0.1:8080/VirtualHostBase/http/rosaonline.org:80/
> > ROSA/VirtualHostRoot/$1 [P,L]
> > </VirtualHost>
> 
> Your RewriteLogLevel is currently set to zero; if you set it to, say,
> '9', you'll get copious amounts of debugging data in your RewriteLog.
> Of course, you'll get this for every request that hits this VirtualHost,
> so if it's a high-traffic VirtualHost, this may not be a good idea. In
> that case, I'd suggest setting up another Apache instance running on
> another port that you can use to play with these configurations and get
> better debugging data.
> 
> --n
> 
> --
> <huey> dd of=/dev/fd0 if=/dev/flippy bs=1024
> <huey> ^^^ Making Flippy Floppy
> 
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Clarification on RewriteRule

Posted by Noah <si...@onastick.net>.
On Sun, Mar 13, 2005 at 01:33:44AM +0530, Rajkumar s wrote:
> Dear sir,
>             I need to rewrite an url, From one of our server i got
> this VirtualHost information , can anyone explain me what this
> RewriteRule implies.
> 
> <VirtualHost 203.199.69.181>
> ServerName rosaonline.org
> RewriteEngine On
> RewriteLog "/usr/local/apache/logs/rewrite.log"
> RewriteLogLevel 0
> ProxyPass  rotaryindia.net  http://203.199.69.181:8080/
> RewriteRule ^/(.*) http://127.0.0.1:8080/VirtualHostBase/http/rosaonline.org:80/
> ROSA/VirtualHostRoot/$1 [P,L]
> </VirtualHost>

Your RewriteLogLevel is currently set to zero; if you set it to, say,
'9', you'll get copious amounts of debugging data in your RewriteLog.
Of course, you'll get this for every request that hits this VirtualHost,
so if it's a high-traffic VirtualHost, this may not be a good idea. In
that case, I'd suggest setting up another Apache instance running on
another port that you can use to play with these configurations and get
better debugging data.

--n

-- 
<huey> dd of=/dev/fd0 if=/dev/flippy bs=1024
<huey> ^^^ Making Flippy Floppy


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org