Document root problem?

I am running a wordpress setup with nginx and I have an error that I
haven’t been able to track down. In my log files I’m getting a lot of
errors like this:

" 17434#0: *140 open() “/home/tcb/public_htmlon” failed (2: No such file
or directory) … "

This is causing a lot of my pages to not load. My document root is
/home/tcb/public_html without the “on” This error is not isolated to any
particular file or script (i.e. getting it for phpmyadmin, wordpress
pages, etc) but it is not consistent.

For example - here is a rewrite rule I have in place: (using the
wordpress plugin and rewrites)

location / {
rewrite log on; //side question - where does this write too?
rewrite ^/([0-9]+)/([_0-9a-zA-Z-]+)/?$ $theme/listing.php?mls=$1
last;
rewrite ^/([0-9]+)/([_0-9a-zA-Z-]+)+.html?$
$theme/listing.php?mls=$1 last;
rewrite ^/([0-9]+)/?$ $theme/listing.php?mls=$1 last;
try_files $uri $uri/ @wordpress;
}

This address works -
http://sellsutah.net/938326/210-summit-dr-smithfield-utah/
and this one fails -
http://sellsutah.net/784004/1290-e-1550-n-north-logan-utah/
with a 404 file not found error

The second one puts an entry in the error log with the error I gave
above.

I very happy with the speed increase from nginx - but frustrated by this
issue

Thank you

Flash

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,63269,63269#msg-63269

Hello!

On Fri, Mar 12, 2010 at 06:17:58PM -0500, flash wrote:

phpmyadmin, wordpress pages, etc) but it is not consistent.

For example - here is a rewrite rule I have in place: (using the
wordpress plugin and rewrites)

location / {
rewrite log on; //side question - where does this write too?

This rewrites any uri containing ‘log’ into ‘on’ (which isn’t
really valid uri). And this causes the message you have.

If you want rewrite logging you should switch it on via

   rewrite_log on;

Note ‘_’. Rewrites will be logged to error_log at notice level.

[…]

Maxim D.

On Fri, Mar 12, 2010 at 06:17:58PM -0500, flash wrote:

In my log files I’m getting a lot of errors like this:

" 17434#0: *140 open() “/home/tcb/public_htmlon” failed (2: No such file or directory) … "

 rewrite log on;  //side question - where does this write too?
           ^^^

and this one fails - http://sellsutah.net/784004/1290-e-1550-n-north-logan-utah/

                                                                   ^^^

I’m not sure what you think the “rewrite log on” line does, but I think
you
probably want to remove it.

It’s funny how these things work, I spent the better part of two days
trying to figure this one out - for the life of me I couldn’t find
anything that would put “on” at the end of my doc root - of course it
was staring me right in the face - just needed to look up one line - to
see it. The second url that I gave has “logan” in the address line -
which get’s rewritten to “on” - nice.

Thanks for the help guys - and to think I almost omitted that line when
I made my post.

Flash

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,63269,63286#msg-63286

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs