-2

I want to install Cacti to use on my server. The problem is that I added the location /cacti { .. in 000-ispconfig.vhost just like phpmyadmin, But I can't access it. Nginx returns error code 404.

Here is what I did till now: apt-get install cacti and apt-get install snmpd

Then, I did locate cacti to see where the web script has gone. seems to be /usr/share/cacti/site/

I opened /etc/nginx/sites-enabled/000-ispconfig.vhost and added a similar directive to phpmyadmin. I can access phpmyadmin and ispconfig itself. but not cacti.

location /cacti {
               root /usr/share/cacti/site/;
               index index.php index.html index.htm;
               location ~ ^/cacti/(.+\.php)$ {
                       try_files $uri =404;
                       root /usr/share/cacti/site/;
                       include /etc/nginx/fastcgi_params;
                       fastcgi_pass unix:/var/lib/php5-fpm/ispconfig.sock;
                       fastcgi_param  HTTPS on;
                       fastcgi_index index.php;
                       fastcgi_param SCRIPT_FILENAME $request_filename;
               }

        }

I think it has something to do with permissons.

HopelessN00b
  • 53,795
  • 33
  • 135
  • 209
xperator
  • 457
  • 2
  • 12
  • 24
  • What does `/var/log/nginx/error.log` say? – mgorven May 12 '12 at 22:19
  • If you think it has something to do with permissions, why don't you check them? – womble May 12 '12 at 23:57
  • @mgorven I didn't know error.log exist...Anyway: http://pastebin.com/WZ6AT54T Still I can't figure out what the error is trying to say. After setting directive in 000-ispconfig.vhost, I tried making a a custom vhost with listening port 80, still not working. Tried many ways and no luck. I don't want to use ISPConfig to manage this, Nginx should be able to run such script with this directive. – xperator May 13 '12 at 06:13
  • Can you please provide all the step you followed to fix the problem, in case someone else has the same error message? –  Oct 02 '12 at 15:41
  • [Administration panels are off topic](http://serverfault.com/help/on-topic). [Even the presence of an administration panel on a system,](http://meta.serverfault.com/q/6538/118258) because they [take over the systems in strange and non-standard ways, making it difficult or even impossible for actual system administrators to manage the servers normally](http://meta.serverfault.com/a/3924/118258), and tend to indicate low-quality questions from *users* with insufficient knowledge for this site. – HopelessN00b Mar 08 '15 at 20:57

1 Answers1

1
PHP message: PHP Fatal error:  require(): Failed opening required '/etc/cacti/debian.php' (include_path='.:/usr/share/php:/usr/share/pear') in /usr/share/cacti/site/include/config.php on line 27

It looks like Cacti is failing because it can't load /etc/cacti/debian.php. Presumably this is supposed to contain some configuration, and I would expect the cacti package to create this. Debian bug 309194 mentions a case where the webserver didn't have access to debian.php. Check that this file exists, and that the user which PHP runs as can read it.

mgorven
  • 30,615
  • 7
  • 79
  • 122
  • I see! So that's why sometimes I was getting internal server error. It was actually running but with php errors being logged. Let me do some check on this debian.php file. – xperator May 13 '12 at 09:33
  • After going through a lot of test and trials, I managed to get it working. My directive used in Nginx was incorrect and debian.php should had correct permissions. Thanks a lot mgorven to helping me debugging this. – xperator May 13 '12 at 12:38