Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

i was wondering this, then found someone else wondering it too (at that stage with no reply)

https://www.virtualmin.com/node/24417

when you switch from apache to nginx you dont get the same option in virtualmin server "Logs & Reports" section to view nginx's error logs

well it couldn't be that hard to add right ?...

share|improve this question

1 Answer 1

up vote 0 down vote accepted

well what do you know, i worked it out (well a quick hack, not as good as the real thing but it works.)

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.