-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accessing http://pi.hole produces "400 Bad Response" error on Fedora 29 #2605
Comments
There is no page at |
If you would like us to take a deeper look you will need to provide the debug token as requested. |
I added the token in the original comment. I never said there was a page at http://pi.hole, which is why I referred to adding an index file at /var/www/html, rather than replacing an existing index file. I did however refer to using the http://pi.hole address as a method of accessing the Pi-hole admin interface, as per the Pi-hole documentation (See: https://github.com/pi-hole/pi-hole/blob/master/README.md and https://discourse.pi-hole.net/t/how-do-i-access-pi-holes-dashboard-admin-interface/3168). Since there is no page at http://pi.hole, the web server would naturally produce a 404 error (https://en.wikipedia.org/wiki/HTTP_404). Line 31 of the lighttpd.conf configuration file that comes with Pi-hole (https://github.com/pi-hole/pi-hole/blob/master/advanced/lighttpd.conf.fedora) determines how lighttpd should handle such an error should it occur. In all cases the action by lighttpd, as defined in line 31 of the lighttpd.conf, is to redirect requests that produce such an error to "pihole/index.php". While the configuration does not seem to be an issue for the version of lighttpd that ships with Debian Stretch (1.4.45), it does seem to be problematic with newer versions of lighttpd, such as the version that ships with Fedora 29 (1.4.52) and perhaps the version shipping with Debian Buster (https://discourse.pi-hole.net/t/web-interface-fails-to-start-after-update/16020). So, adding a leading forward slash to the server.error-handler-404 option defined in lighttpd.conf will likely fix that small issue for newer versions of lighttpd, and it also does not break the current version shipping with Debian Stretch. |
A snippet from the installer:
The installer states that you should be using However, I do notice inconsistent behaviour between using
|
I'm having this same issue on a fresh install of CentOS 7 with lighttpd 1.4.53. |
Me too @micchickenburger |
Just looking at this issue again..
And in the lighttpd logs:
Since the PHP code states We should likely add the |
If the issue is related to the version of lighttpd as I suspect (which explains why the current configuration works with Debian Stretch and its older version of lighttpd, but not with the newer versions that ship with Fedora), then this current configuration will eventually produce the same problem with Debian anyway, once Debian starts shipping with newer versions of lighttpd. It should be an easy fix and I personally wasn't able to get the adjusted configuration file (with the added forward slash) to cause any problems with Debian Stretch, so there is probably no downside to making the change. |
We should likely add the / to the debian lighttpd.conf to stay consistent. that is good idea |
I experienced the same problem on Fedora 29 |
That's a peculiar error. It certainly doesn't happen to me when changing that line. I wonder if it happens with a different browser? If not, perhaps the system logs give some indication as to the culprite. |
Hi, I ran and saw that /admin/* were missing some SELinux http stuff compared to /pihole/*.
I hope this will help you |
Hi, Fresh install on CentOS7 with SELINUX=permissive resulted in the same issues. Setting |
What if the hostname of the machine pihole is actually installed on is pihole.lan? I noticed this breaks the webinterface unless you connect to it by ip |
Does it respond with a 400 error on the name |
@dschaper it's able to fetch the index, but there are hardcoded references to pi.hole which results in the following resources not being able to load:
|
That will be a different issue/feature request than we are tracking in this issue. Please open a new issue here or a Feature Request on https://discourse.pi-hole.net. Thanks. |
For now I pushed the devices into a beta using their internal network hostnames with SELINUX disabled. |
Just installed pi-hole on a Raspberry Pi 4 running fresh install of Raspbian Buster and having the same issue of "400 Bad Request" error upon loading http://pi.hole. Existing pi-hole instance (running on 1st gen raspi) redirects me to /admin without any issue when I visit http://pi.hole. |
I'm in the same boat with a fresh install of Ubuntu Server 19.04 where browsing http://ipaddress/ results in the "400 bad request" page On 18.04 LTS (separate VM), using the same URL format, sends me to a landing page with the pi-hole logo, and states "Pi-hole: Your black hole for Internet advertisements. Did you mean to go to the admin panel?" (which links to the admin page). |
Please open a new issue, this is for tracking 400 responses to http://pi.hole on Fedora. |
@dschapter. Ok |
Actually, this issue seems to have apply to newer versions of lighttpd, not Fedora specifically. I just happened to experience the issue on Fedora. I would expect the issue to apply to all distributions with a new enough lighttpd version. |
Agreed since @jankais3r mentioned that it was happening on Raspbian (which is Debian-based like Ubuntu). |
This issue is marked as fixed in the next release. The changes are available in the development branch. |
Pi-hole v5.0 has just been released. |
In raising this issue, I confirm the following:
{please fill the checkboxes, e.g: [X]}
How familiar are you with the the source code relevant to this issue?:
1
Expected behaviour:
Accessing http://pi.hole should redirect one to http://pi.hole/admin automatically.
Actual behaviour:
"400 Bad Response" error.
Also, the following error message is logged in the lighttpd error log:
pihole (response.c.400) uri-path does not begin with '/': pihole/index.php -> 400
Steps to reproduce:
Debug token provided by uploading
pihole -d
log:usxyflu4ki
Troubleshooting undertaken, and/or other relevant information:
Adding an index file in /var/www/html that redirects requests to /pihole/ works to prevent the 400 error. However, it seems like the problem is in the lighttpd.conf file. Assuming that the server.error-handler-404 is still the best way to handle a missing index file, then it's probably better to do a...
The above change fixes the problem and restores normal functioning. It seems the original configuration worked when I first installed pihole, so perhaps a lighttpd upgrade in Fedora 29 broke this original syntax (which may no longer be supported by lighttpd?).
See: https://redmine.lighttpd.net/projects/lighttpd/wiki/Server_error-handler-404Details
The text was updated successfully, but these errors were encountered: