# Logging 'return 404' to error log?

**URL:** <https://www.ruby-forum.com/t/logging-return-404-to-error-log/223814>\
**Category:** NGINX\
**Created:** [October 18, 2012, 2:42pm UTC](https://www.ruby-forum.com/t/logging-return-404-to-error-log/223814 "2012-10-18T14:42:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [October 18, 2012, 2:42pm UTC](https://www.ruby-forum.com/t/logging-return-404-to-error-log/223814/1 "2012-10-18T14:42:01Z")

</div>

Asked this in How to… forum, but it seems not much activity, so i try  
to  
post in here… Anyone know this?

Hi,  
I’m have a question like title subject. I have an nginx/1.2.1  
installation,  
the nginx configuration like this:

location ~ ^/abc/ {  
if (!-e $request\_filename) {  
return 404;  
break;  
}  
proxy\_pass [http://127.0.0.1:8080](http://127.0.0.1:8080);  
include /etc/nginx/proxy.conf;  
}

config running good, but all the 404 log from this “return 404;” move to  
access log. I want it move to error log, so I try use log\_not\_found but  
have  
syntax error.

Do you have an idea how to do this?

Sorry for my poor english!

Thanks,  
vinhomn

Posted at Nginx Forum:

> **[Logging 'return 404' to error log?](https://forum.nginx.org/read.php?2,231972,231972#msg-231972)**
>
> Asked this in How to... forum, but it seems not much activity, so i try to post in here... Anyone know this? Hi, I'm have a question like title subject. I have an nginx/1.2.1 installation, the nginx configuration like this: location ~ ^/abc/ { if...
