Vnstat CGI problem.

Hi! :slight_smile:

I just installed vnstat and vnstat-cgi packages, from Lemmy04 repository.
I have Open SUSE 13.2 x64 KDE and I was using them with the previous version.
The Vnstat package works great, but I have problem with the CGI one (actually used for graph visualization).

I’m starting the apache daemon (giving as root: “systemctl start apache2.service” and then I’m pointing Firefox to http://localhost/vnstat/, only to receive the error message:
“Access forbidden! You don’t have permission to access the requested directory. There is either no index document or the directory is read-protected. If you think this is a server error, please contact the webmaster.
Error 403
localhost
Apache”.

PS. I have edited the /srv/vnstat/vnstat.cgi Perl script, changing the older eth0 and 1 references to the newer enp0s7 one.
Best Wishes for the holiday seasson!!! :wink:
G.

The error you’re seeing is the inability to serve a file to the browser client, not permissions to the cgi directory.

This probably means that you didn’t setup your apache website correctly, specifying the website root (assuming that the vnstat subdirectory is a physical subdirectory of the root and doesn’t point elsewhere).

Did you use YAST to configure your webserver? If you don’t see the YAST applet, install it as follows

zypper in yast2-http-server

If /vnstat is a virtual directory, then you’ll need to verify it’s configured correctly (path and permissions).

Bottom line is, wherever /vnstat points to, there should be a website file in that directory to serve to the browser(something else to verify).

TSU

I installed it, but (since I’m using KDE Network Manager), it asks me:
"Your network interfaces are currently controlled by NetworkManager
but the service to configure might not work well with it.

Really continue"?

“Continue” - “Cancel”.

Sould I try to continue?

The main unspoken issue is whether you’ve assigned static addresses or using DHCP for dynamic addresses. Although there is no certain relationship between DHCP and whether you use Network Manager or not, the server configuration applet is testing for Network Manager (ie With NM, you can set NICs for both DHCP or static, but the <default> is to use DHCP. When NM is not used, you can still set the NIC for DHCP or static, but generally speaking people advise turning off NM when you want to set static addresses. So, although the test is faulty, it’s playing the odds what the User has configured).

So, although I have not tested your specific scenario, as long as you have set your NIC to some static address you should “continue” safely.

TSU

Indeed I’m using NM and I’ve assigned a static IP to my PC (because I’m using a Torrent client).

Anyway! I launched Yast’s HTTP server applet, but I’m afraid I’m a completely stranger to these settings.
I’ll try to read the documentation and play arround a bit, to see what’s going on.
The strange thing though, is that with the previous Open SUSE version, Vnstat-CGI, worked just out of the box (without touching any of Apache settings or config files).
G.