• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

Question How to get munin working again after switch from Apache to nginx ?

pec

New Pleskian
I recently switched from Apache to nginx (thanx to @UFHH01 ;) ), details here https://talk.plesk.com/threads/seo-friendly-urls-after-switch-from-apache-to-nginx.342063.

Now my site works well. Unfortunately, I am not able to access the munin stats anymore, neither via default domain nor via IP of the server.
The XenForo software steps in and complains about a missing route to "/munin".

My vhost_nginx.conf of the default domain now looks like this, based on suggestion on https://www.scalescale.com/tips/nginx/monitor-nginx-munin/:
Code:
# munin configuration
location /munin {
    alias   /var/www/munin/;
    index  index.php index.html index.htm;
    location ~* \.(png|jpg|jpeg|gif|ico)$ {
    }
}

if (!-e $request_filename){
    rewrite ^(.*)$ /index.php break;
}

location /install/data/ {
    internal;
}
location /install/templates/ {
    internal;
}
location /(internal_data|library) {
    internal;
}

# Media: images, icons, video, audio, HTC
location ~* \.(?:jpg|jpeg|gif|png|ico|gz|svg|svgz|mp4|ogg|ogv|webm|htc|woff)$ {
    expires 1M;
    access_log off;
    add_header Cache-Control "public";
}

# CSS and Javascript
location ~* \.(?:css|js)$ {
    expires 1y;
    access_log off;
    add_header Cache-Control "public";
}

Did I miss something ?
 
Hi pec,

I personally don't know much about "munin", but due to the fact that you recently switched from apache to the combination nginx+apache, I assume, that munin has a configuration file, where you define the webserver ports. In general that would be ":80"/":443" for the apache - webserver, but after your switch, it is ":7080"/":7081" for apache and now ":80"/":443" for nginx.

It would as well help, if you provide informations, how you formerly installed munin and what operating system you use. In addition it could as well help, if you provide informations about your PHP - handler in use for your domain and last but not least, you should be aware, that log - files often help to investigate issues/errors/problems. :)


Apart from the above, pls. note that this forum is a "Plesk-related" - community and you are currently in the subforum "Plesk Onyx" - consider to post threads, which are not related to Plesk, in the subforum: => Home > Forum > General Discussion > Open Topics
 
Hi @UFHH01,

The munin config is quite simple, no ports to configure, only paths:
Code:
# The next three variables specifies where the location of the RRD
# databases, the HTML output, and the logs, severally.  They all
# must be writable by the user running munin-cron.
dbdir   /var/lib/munin
htmldir /var/www/munin
logdir  /var/log/munin
rundir  /var/run/munin

# a simple host tree
[MyServer]
    address 127.0.0.1
No errors in the munin log. Munin itself works as before, all html and png files are created/updated regularly.
It's only the access to the files, that's not working. Seems that the "way" to /var/www/munin/ is not found, although (IMO) correctly configured.

nginx log says:
Code:
xx.xxx.xxx.xxx - - [15/Mar/2017:08:27:24 +0100] "GET /munin/ HTTP/1.1" 404 11372 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"

Server OS is Ubuntu 12.04.5 LTS‬, munin has been installed via apt, php version is 7.0.16.
Plesk is 17.0.17 Update #18.

This morning I saw that also the Plesk webstats are not working any longer :(
Using the link in plesk (https://www.domain.com/plesk-stat/webstat/) returns a 404, https://www.domain.com/plesk-stat/ a 403.

Apart from the above, pls. note that this forum is a "Plesk-related" - community and you are currently in the subforum "Plesk Onyx" - consider to post threads, which are not related to Plesk, in the subforum: => Home > Forum > General Discussion > Open Topics
You're totally right, sorry. munin is (unfortunately) not part of plesk ;)
But with the stats now also not working it's possibly general plesk issue and potentially posted in the right forum ;)
 
Hi pec,

I'm not a moderator, pec, but you should never consider to mix issues in one thread - there is plenty of space here, to open a new thread for each issue. :)


You could try to use:
Code:
location ^~ /munin/ {
    alias   /var/www/munin/;
}


This morning I saw that also the Plesk webstats are not working any longer
Consider to post your corresponding configuration files, in order to get help with your investigations and don't forget, that log - files often help as well, to get to the root cause of an issue/error/problem. :)
 
  • Like
Reactions: pec
HI @UFHH01
Thanks for your quick reply ;)
I'm not a moderator, pec, but you should never consider to mix issues in one thread - there is plenty of space here, to open a new thread for each issue. :)
I wasn't sure if the issues with munin and with plesk stats do have the same root cause. That's why my last sentence in my previous post ;)
But ok, I will open a new thread for the stats issue. Tomorrow ;) This thread could be moved to the other forum by a moderator.

You could try to use:
Code:
location ^~ /munin/ {
    alias   /var/www/munin/;
}
Unfortunately, same result: 404 :(
 
Back
Top