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

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.

share|improve this question

closed as off-topic by HopelessN00b Mar 8 at 20:57

  • This question does not appear to be about server, networking, or related infrastructure administration within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

    
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: 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 6:13
    
Can you please provide all the step you followed to fix the problem, in case someone else has the same error message? –  user130370 Oct 2 '12 at 15:41
    

1 Answer 1

up vote 1 down vote accepted
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.

share|improve this answer
    
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 9: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

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