Nginx logs for virtualserver missing

2 posts / 0 new
Last post
#1 Sat, 12/08/2012 - 06:53
steven123

Nginx logs for virtualserver missing

Hi, i've been looking for a solution all over and cant find one, i have installed virtualmin script installer fresh on centos 6. And added nginx. All fine i have several servers setup on dual this one nginx only. Now i know dual is not supported but there a ways around with some manualwork what really bothers me i cannot get the log's tab to show up even when it's only running on nginx, I have checked permissions! Logs name ie: containing the domain name first i tried adding apache as usergroup i just can't get virtualmin to show nginx logs!!!! So am i missing something here? log format? just can't understand! Please help with this stupid issue

Thu, 01/17/2013 - 04:50
haydent

here's a quick hack, edit virtual-server-lib-funcs.pl

(for me in debian in was in /usr/share/webmin/virtual-server )

(check your nginx log path is the same)

add this around line 11091 after the bandwidth button is added:

#nginx error log
 
             push(@rv, { 'mod' => 'syslog',
                'title' => 'Nginx Error Log',
                'desc' => 'Nginx Error Log',
                'page' => "save_log.cgi?view=1&file=/var/log/virtualmin/".$d->{'dom'}."_error_log",
                'cat' => 'logs',
              });
 
#nginx error log    

now it wont show up straight away, as these links are cached, so you can wait of for a reload by going to line 10786:

local $crv = &get_links_cache($ckey, $v);
if ($crv) {
    return @$crv;
    }

change if($crv){ to if(0){

save, upload, refresh virtualmin, your new link's should be visible, now undo this change and re-upload

Topic locked