Apache - Domain not resolving : 404 errors - apache

My Centos 5.1 VPS (WHM) had to be hard rebooted earlier and all the sites apart from one have come back online. The non working domain pings with 0% packet loss so it looks as though Apache is serving, however, I get the error:
Not Found
The requested URL / was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
I checked the DNS settings and as expected, they point to the host. I checked the permissions and CHMOD values for the public_html folder and they are all correct. I restarted Apache and BIND but I still can't get the domain to work. Incidentally, adding erroneous characters to .htaccess (in an attempt to produce an error), does not make any difference. The host did a system file check which showed no errors.
What have I missed?

Related

Serving directory on samba share with Apache 2.4.41 truncates header

I have a strange problem when downloading files from an Apache 2.4.41 webserver serving files from a samba share on Ubuntu 20.04.
A python requests call ends in BadStatusLine('pache/2.4.41 (Ubuntu)\r\n')) and Chrome sometimes shows partial http headers in the begining of the file.
Usually the response would start with "HTTP/1.1" while with this server it directly starts with "pache 2.4.41" which looks like a shortened "Apache 2.4.41".
After digging a lot I found one helpful post: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=900821
If I set "EnableSendfile On" in Apache for this directory it now seems to work. But this is scary as hell. Will it always work? Also for file uploads, etc.? Why is this still an issue in 2021 when the original error was reported in 2018!
And here the server response:

Apache2 will only serve small files

I just know this is one of those questions where the solution should have been obvious and I'm going to feel like an idiot but I'm stuck.
I've set up a basic apache2 web sever under openSUSE Leap 15.1 on my LAN with a single virtual host (for the moment).
If I create a simple html file of 255 bytes or less a browser on another workstation picks it up without problem. If the file gets to anything larger than 255 bytes apache doesn't serve it. The GET request shows up on the server but nothing shows in Firefox, Konqueror at least gives me a 1b Object not found error.
I should say that running a browser on the server itself shows all these files perfectly well should I use 127.0.0.1, localhost or the server name in the URL.
Is this an Apache2 directive I've missed or something else entirely?
After setting the LogLevel to trace1 and then hunting around on the web I came across what appears to be the solution. Set the Apache directive ...
EnableSendfile Off
Apparently Apache is compiled with this set to On and the kernel sendfile doesn't do the job. Not a detailed explanation I know but I haven't followed this all the way through - I just needed to get Apache working!

mod_jk produces incorrect redirect query string with Lucee and Apache

I am getting too many redirects after implementing a solution to THIS problem
"mod_jk to shows/append index.cfm?&_modcfmlredirected on page load"
I am trying to run Lucee CF with Apache 2.4 on a windows EC2 instance.
Install of both Apache 2.4 and Lucee went fine - both services come up fine and restart fine... Apache conf is pointed to a webroot - and test page comes up fine.
I have followed instructions on implementing mod_jk - but when I tested a simple index.cfm - I got this:
index.cfm?&_modcfmlredirected
I found multiple answers - that all recommended updating your 'mod_cfml-valve_v1.1.09.jar' to 'mod_cfml-valve_v1.1.10.jar'.
So I did...
And now I get this:
http://127.0.0.1/index.cfm?&__&__&__&__&__&__&__&__&__&__&__&__&__&__&__&__&__&__&__
This page isn’t working 127.0.0.1 redirected you too many times.
Try clearing your cookies.
ERR_TOO_MANY_REDIRECTS
reverting to the 1.1.09 file brings back the ?&_modcfmlredirected as expected.
The code of index.cfm is simply
CF Index :
<cfoutput>#now()#</cfoutput>
This is not a 'code' issue....
Any help is greatly appreciated.
**** ADDITIONAL INFORMATION ****
this redirect happens when viewing file from localhost (127.0.0.1)
however, when I view the page from outside the server - I get a 403 - Forbidden error.
don't know id this helps - I hope so.

Contao CMS error with https - 404 error

Morning
I have a domain, www.example.com, which is a Contao 3.1.3 CMS website on Linux Apache.
I have just purchased and installed SSL certificate for the domain.
When I go to https://www.example.com (or https://example.com) all works fine.
when I try one of the other pages on the domain, http://www.example.com/folder/page.html all is fine, but with https://www.example.com/folder/page.html
, I get an error:
The requested URL /folder/page.html was not found on this server.
This does not happen with pages in the admin area, which all appear fine via https
Console log shows:
Failed to load resource: the server responded with a status of 404 (Not Found)
What is the solution to make all pages appear ok under https
I tried this: https://community.contao.org/de/showthread.php?43595-SSL-und-Contao
but it didn't help
I also checked https://www.sslshopper.com/ssl-checker.htm to see if the error is with the ssl certificate, but no problems found there.
Jez D
Problem cannot be on the SSL. From your explanation I would suggest you play around with disabling folder urls and url rewrite in the settings. Then make sure the page exists. I am sure from here you will be able trace down the problem.
Make sure also in the root page, the 'domain' field is on https if its set.
You can restore your folder and url rewrite settings when all is well
The issue was actually with the directives on the virtual server.

Error on Zabbix: /server-status 404: Not Found.

I've been dealing with this whole day and still can't figure it out.
I've setup Zabbix on one machine, and I want to monitor the Apache server on another machine.
I've completed all the steps described in the docs: http://www.zabbix.com/wiki/templates/apache
and still I get no data in the Apache Template. When checking the logs on the Apache server, I can see in access.log:
IPADDR - - [16/Jul/2012:13:29:08 +0000] "GET /server-status?auto HTTP/1.0" 404 13826 "-" "Python-urllib/1.17"
I think it might has something to do with Virtual Servers and additional sites I have on that machine, but I can't figure it out, and nothing mentioned in the docs...
The Apache checks are not as clever as you may think.
Can Zabbix communicate with your apache server? Link it to a template with something simple like "uptime" and verify that it indeed gets data.
Next, verify that there aren't any firewall rules prevent the zabbix server from communicating with your web server. Can you curl your homepage from the zabbix host without problems?
Are the apache checks active checks? If so you'll need to make sure active checks are enabled in the /etc/zabbix/zabbix-agentd.conf file and that the "Hostname" within the conf is unique and matching up correctly with what you have in the zabbix server.
If that fails, change the DebugLevel to 4 in /etc/zabbix-agentd.conf and tail the zabbix log. Look and see if it is having trouble with any checks.
This is an apache configuration problem, zabbix can't do anything if /server-status yields a 404 error.
Maybe the <Location /server-status>...</Location> directive is not at the right place in apache's configuration.
Try to move it inside the <VirtualHost> section of the specific virtual server to which the GET /server-status is routed.
Also make sure that mod_status is enabled.