XFileSharing Pro - How to turn off nginx access_log keeping

Powerfull XFileSharing version

Moderator: admin

Message
Author
venture89
Posts: 95
Joined: Aug 30, 2011 12:11 am
Location: Planet Z

How to turn off nginx access_log keeping

#1 Postby venture89 » Oct 18, 2012 12:34 am

Hello,

I searched the internet and came up withf ollowing solution

Code: Select all

access_log off;
in /usr/local/nginx/conf/nginx.conf
And then I restart nginx by

Code: Select all

#killall -1 nginx


However, I still see error log being written to at /usr/local/nginx/logs
Can some one tell me how to turn off nginx access_log keeping?

Thanks in advance.

trinsic
Posts: 149
Joined: Dec 21, 2009 9:24 am

#2 Postby trinsic » Oct 18, 2012 12:55 am

You can't turn off error logging. You have to use:

Code: Select all

error_log /dev/null crit;

venture89
Posts: 95
Joined: Aug 30, 2011 12:11 am
Location: Planet Z

#3 Postby venture89 » Oct 18, 2012 4:48 am

Yes, but how do we turn off access logging?
Thanks

trinsic
Posts: 149
Joined: Dec 21, 2009 9:24 am

#4 Postby trinsic » Oct 18, 2012 4:56 am

You posted it already:

Code: Select all

access_log off;


Try putting it in server as well as http.

venture89
Posts: 95
Joined: Aug 30, 2011 12:11 am
Location: Planet Z

#5 Postby venture89 » Oct 18, 2012 5:02 am

I did that and even rebooted server and also restarted nginx but the log file is still being written to.


This is a bit off-topic but i a, having my site going down during high load with this nginx error log. I think it has to do with nginx or fascgi config. I am waiting for support to help me out, if you know anything please let me know.

Thanks in advance.


Code: Select all

2012/10/18 00:26:08 [error] 5540#0: *364267 upstream timed out (110: Connection timed out) while connecting to upstream, client: 189.218.91.85, server: site.com, request: "GET /heplchhz2wmh.html HTTP/1.1", upstream: "fastcgi://127.0.0.1:9011", host: "site.com", referrer: "http://www.ref.com/s/player.php?s=site&idvideo=hepl

trinsic
Posts: 149
Joined: Dec 21, 2009 9:24 am

#6 Postby trinsic » Oct 18, 2012 6:03 am

Remove the crit bit on the end.

Personally I like to keep error_log on but I use:

Code: Select all

log_not_found off;
to not count 404 errors which keeps error_log low.

As for timing out it's likely fastcgi, try adding more fcgi threads.

venture89
Posts: 95
Joined: Aug 30, 2011 12:11 am
Location: Planet Z

#7 Postby venture89 » Oct 18, 2012 6:21 am

Thanks trinsic for your help.

Yes fastcgi issue was helped by support here. had to edit values in index-fcgi.cgi and index_dlf.cgi and restart fastcgi.


regarding disabling the access log in web-host nginx: I can not find a specified log path in the usr/local/nginx/nginx.conf so if I put 'acess_log off;' in this file it will turn off access log?

Here is my current nginx.conf in web-host.
Compare to my file hosts I see "error_log logs/error.log crit;" is also missing from web host nginx.conf




Code: Select all

# cPanel Nginx Master configuration
user  nobody;
error_log  logs/error.log;
#Number of worker you need
worker_processes  4;
worker_rlimit_nofile 30000;
# How many connections a worker can handle maximum.
events {
    worker_connections  50000;
}
http {
   include    mime.types;
    default_type  application/octet-stream;
    sendfile on;
   server_names_hash_max_size 10000;
        server_names_hash_bucket_size 1024;
    tcp_nopush on;
    tcp_nodelay on;
    keepalive_timeout  10;
    gzip on;
    gzip_min_length  1100;
    gzip_buffers  4 32k;
    gzip_types    text/plain  application/x-javascript text/xml text/css;
    ignore_invalid_headers on;
    client_header_timeout  3m;
    client_body_timeout 3m;
    send_timeout     3m;
#    include "/usr/local/nginx/conf/vhost.conf";
#    include "/etc/cpnginx/cpanelproxy.conf";
    include "/usr/local/nginx/conf/vidbull.conf";
    include "/usr/local/nginx/conf/vhosts_extra.conf";

   server {
      listen 80;
      location / {
         proxy_pass        http://localhost:8888;
         proxy_set_header  X-Real-IP  $remote_addr;
      }
   }
}

trinsic
Posts: 149
Joined: Dec 21, 2009 9:24 am

#8 Postby trinsic » Oct 18, 2012 6:48 am

Put access_log off; in the http block and the server block.

venture89
Posts: 95
Joined: Aug 30, 2011 12:11 am
Location: Planet Z

#9 Postby venture89 » Oct 18, 2012 9:41 am

This seems to have fixed it. Thanks again.


Return to “XFileSharing Pro”

Who is online

Users browsing this forum: No registered users and 0 guests