You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Sai A <ar...@gmail.com> on 2010/11/13 16:14:07 UTC

[users@httpd] Rewrite logs are empty (Apache 2.0.47)

Hi,

I am trying to write a few rewrite rules for on my Apache server (ver
2.0.47) for a specific virtual host. I know some rewriting happens but no
log is getting generated. I searched on Google and found a lot of threads,
unfortunately none of the ones I read solved my problem. I have done all of
the following:

-Loaded the rewrite module
-RewriteEngine on
-RewriteLog log/filename
-Have set RewriteLogLevel to 9
-changed the log file to have 777 chmod access.
-restarted apache several times

But it is still empty. Can you tell me what I am missing?

The rewrite rules are defined within a virtual host as follows:

NameVirtualHost a.b.c.d:80

RewriteLog logs/mytestname-rewrite_log
RewriteLogLevel 9

I've tried the above both inside and outside the virtual host.

<VirtualHost a.b.c.d:80>
ServerName www.mytestname.com

RewriteEngine on

RewriteRule ^/offers/(.*)$ http://somehost.com/offers/$1\?show=default[NE,P,L]
RewriteRule ^/(.*)$ http://someotherhost.com/$1 [P,L]

</VirtualHost>

I have quite complicated rules to follow this, I am just trying to start
with the smaller ones to get a hang of mod_rewrite. Rewrite seems to be
happening because calls to www.mytestname.com successfully get proxied from
someotherhost.com but the offers one doesn't work properly and a few other
rules as well.

Thanks,
Sai

Re: [users@httpd] Rewrite logs are empty (Apache 2.0.47)

Posted by Sai A <ar...@gmail.com>.
I didn't try with an absolute path, only with relative paths. The file does
get generated inside the logs folder, just that it is empty.

Inigo, thanks a lot for trying to help. I really appreciate everybody's help
and time on these threads.

A fellow colleague informed me that he'd earlier had a similar problem. It
had to do with the mod_rewrite not being properly loaded or something like
that... I am waiting for him to investigate the problem. I'll get back as
soon as the problem resolves to say what the problem/solution was.

On Mon, Nov 15, 2010 at 2:57 PM, iñigo medina <im...@grosshat.com> wrote:

> When you say:
>
>
> "I've tried the above both inside and outside the virtual host."
>
> do you mean you have already tried absolute path? For instance:
>
> RewriteLog "/var/apache2/log/rewrite.log"
>
> iñ
>
>
> 2010/11/13 Sai A <ar...@gmail.com>
>
> Hi inigo,
>>
>> I tried it out now but that doesn't seem to be help as well. I am really
>> confused. What could be it?
>>
>> All your help is appreciated. Thanks for the replies.
>>
>>
>> On Sat, Nov 13, 2010 at 10:18 PM, iñigo medina <im...@grosshat.com>wrote:
>>
>>> Have you tried with the directive as follows?
>>>
>>> RewriteLog "logs/file.log"
>>>
>>> iñ
>>> El 13/11/2010 16:24, "Sai A" <ar...@gmail.com> escribió:
>>>
>>
>>
>
>
> --
> -------------------------------------
> imedina@grosshat.com
> es un mundo mágico
>

Re: [users@httpd] Rewrite logs are empty (Apache 2.0.47)

Posted by iñigo medina <im...@grosshat.com>.
When you say:

"I've tried the above both inside and outside the virtual host."

do you mean you have already tried absolute path? For instance:

RewriteLog "/var/apache2/log/rewrite.log"

iñ


2010/11/13 Sai A <ar...@gmail.com>

> Hi inigo,
>
> I tried it out now but that doesn't seem to be help as well. I am really
> confused. What could be it?
>
> All your help is appreciated. Thanks for the replies.
>
>
> On Sat, Nov 13, 2010 at 10:18 PM, iñigo medina <im...@grosshat.com>wrote:
>
>> Have you tried with the directive as follows?
>>
>> RewriteLog "logs/file.log"
>>
>> iñ
>> El 13/11/2010 16:24, "Sai A" <ar...@gmail.com> escribió:
>>
>
>


-- 
-------------------------------------
imedina@grosshat.com
es un mundo mágico

Re: [users@httpd] Rewrite logs are empty (Apache 2.0.47)

Posted by Sai A <ar...@gmail.com>.
Hi inigo,

I tried it out now but that doesn't seem to be help as well. I am really
confused. What could be it?

All your help is appreciated. Thanks for the replies.

On Sat, Nov 13, 2010 at 10:18 PM, iñigo medina <im...@grosshat.com> wrote:

> Have you tried with the directive as follows?
>
> RewriteLog "logs/file.log"
>
> iñ
> El 13/11/2010 16:24, "Sai A" <ar...@gmail.com> escribió:
>

Re: [users@httpd] Rewrite logs are empty (Apache 2.0.47)

Posted by iñigo medina <im...@grosshat.com>.
Have you tried with the directive as follows?

RewriteLog "logs/file.log"

iñ
El 13/11/2010 16:24, "Sai A" <ar...@gmail.com> escribió:

Re: [users@httpd] Rewrite logs are empty (Apache 2.0.47)

Posted by Sai A <ar...@gmail.com>.
Eric,

Other than the virtual host that I've created, there is only the main
server. I have rewrite rules only for this virtual host, nowhere else do I
have them. And one rewrite works, but the other doesn't. I have tried
defining the log and log level outside as well as inside the virtual host,
but still it is empty.

On Sat, Nov 13, 2010 at 8:45 PM, Eric Covener <co...@gmail.com> wrote:

> On Sat, Nov 13, 2010 at 10:14 AM, Sai A <ar...@gmail.com> wrote:
> > Hi,
> >
> > I am trying to write a few rewrite rules for on my Apache server (ver
> > 2.0.47) for a specific virtual host. I know some rewriting happens but no
> > log is getting generated. I searched on Google and found a lot of
> threads,
> > unfortunately none of the ones I read solved my problem. I have done all
> of
> > the following:
>
> probably happening in a different virtualhost.
>
> --
> Eric Covener
> covener@gmail.com
>
> ---------------------------------------------------------------------
> 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] Rewrite logs are empty (Apache 2.0.47)

Posted by Eric Covener <co...@gmail.com>.
On Sat, Nov 13, 2010 at 10:14 AM, Sai A <ar...@gmail.com> wrote:
> Hi,
>
> I am trying to write a few rewrite rules for on my Apache server (ver
> 2.0.47) for a specific virtual host. I know some rewriting happens but no
> log is getting generated. I searched on Google and found a lot of threads,
> unfortunately none of the ones I read solved my problem. I have done all of
> the following:

probably happening in a different virtualhost.

-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
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