Hey guys,
my pi-hole is running on a debian 9 - all updates installed. I used the webinstaller for pi-hole - everything is working fine.
Now I'd like to set-up bandwithd on the same machine by using lighttpd - like pi-hole is already using.
I created the file /etc/lighttpd/conf-available/91-aliases.conf for collecting all aliases (here: only one (1)) in one file, but it's not working. This is the content:
alias.url += (
"/bandwidth" => "/var/lib/bandwidthd/htdocs"
)
Any suggestions?
Thanks to the community.
1 Like
bidon
April 2, 2018, 6:16pm
2
Could be a trouble with trailing slash ?
What are the results for a request with /bandwidth/ and another request with /bandwidth ?
Also, look into access and error logs of the httpd sever for info about what file/dir is accessed.
I tried /bandwidth/, /bandwidthd/, /bandwidthd, /bandwidth.
This are the results from access.log (no error.log-entries):
1522694596|lo.cal.ho.st|GET /bandwidth/ HTTP/1.1|200|342
1522694597|lo.cal.ho.st|GET /bandwidthd/ HTTP/1.1|200|342
1522694601|lo.cal.ho.st|GET /bandwidthd HTTP/1.1|200|342
1522694605|lo.cal.ho.st|GET /bandwidth HTTP/1.1|200|342
In all tested browser I only receive the pi-hole-default page (not the admin interface).
Anything else?¿?
This is the displayed page:
bidon
April 2, 2018, 7:07pm
5
that the 404 file...
server.error-handler-404
That's probably means the /bandwidth is checked in the document-root. My guess is that your alias isn't working ...
Do you have the alias module loading in your lighttpd ? Look at the server.modules in your /etc/lighttpd/lighttpd.conf
Don't forget that the conf file could be overwrited by pi-hole update/reinstall, etc...
mibere
April 2, 2018, 7:20pm
6
This worked for me...
sudo nano /etc/lighttpd/conf-enabled/90-my.conf
Content:
alias.url += (
"/bandwidth" => "/var/lib/bandwidthd/htdocs/"
)
sudo nano /etc/lighttpd/lighttpd.conf
Content:
server.modules = (
...
"mod_alias"
)
sudo /etc/init.d/lighttpd restart
Now open 192.168.x.x/bandwidth/ in your browser.
cat /etc/lighttpd/lighttpd.conf:
server.modules = (
"mod_access",
"mod_accesslog",
"mod_alias",
"mod_auth",
"mod_expire",
"mod_compress",
"mod_redirect",
"mod_setenv",
"mod_rewrite"
)
Thanks for the hint.
That's the solution:
I created my aliases-file (/etc/lighttpd/conf-available/91-aliases.conf), but there was no link in /etc/lighttpd/conf-enabled:
/etc/lighttpd/conf-enabled# ln -s ../conf-available/91-aliases.conf 91-aliases.conf
With this link and the restart it's working fine. Now I only have to optimize the output of bandwidthd.
Thank you.
@mibere : Do you use a database for bandwidthd or file system? I'd like to use MariaDB10 as "storage".
Greets.
system
Closed
May 4, 2018, 8:53am
10
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.