server configuration error - apache

what does this address http://www.jasbf.com/ says i did not understand when i check my error log it says something like this
[Mon Jan 17 01:15:22 2011] [error] File does not exist: /public_html/favicon.ico
[Mon Jan 17 01:15:21 2011] [error] File does not exist: /public_html/404.shtml

This is Apache's DocumentRoot misconfiguration.

It is missing files or file permissions are wrong.

favicon.ico is the little image left of the url bar in firefox/internet explorer. Those (and many more) browsers are looking for this icon to display. That is where the upper error comes from.
In case a webserver cannot find a requested url; it needs to display an error. This particular error is also known on the web as a "404 (not found)" error. However; this is displayed as a regular html page. The 404.shtml is probably what the webbrowser wants to use as 404 page.

Related

Why is 404 working when comment disabled

In my httpd.conf file, every mention of the ErrorDocument has a hash before it on the same line - meaning that it's commented out.
So why do I get a 404 error page on the browser? How does the browser know what message to display?
I must be getting a 404 because this is displayed in the error_log;
[Wed Jun 25 12:21:17 2014] [error] [client **********] File does not exist: /var/www/html/surveys/blahblah
Is there a default setting somewhere?
My environment is Linux, Apache and PHP
You see Apache httpd's simple hardcoded message.
You need to configure an empty document as the ErrorDocument if you want a empty page to be displayed.
See the Apache Documentation or this question for further informations.

Apache - File does not exist error (file is definitely there) - favicon.ico

I have apache set up as a LAMP server in Linux
In the root /www/ directory, I have a favicon.ico but it never shows in the browser (Chromium, Firefox) and in the apache error.log I get the following error:
[Mon Jul 08 17:32:30 2013] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico
I'm not especially bothered with the file not appearing but it is there and I haven't been able to figure out why it's giving me this error.
(Answered in a question edit. Converted to a community wiki answer. See Question with no answers, but issue solved in the comments (or extended in chat) )
The OP wrote:
The favicon was 32x32 which seems to be why. I substituted with a 16x16 favicon.ico file and I no longer get this error.
What I further don't understand is why I would get this at all - presumably some setting as I have an apache server on a hosted website with the same 32x32 favicon but it appears there and there are no errors.

500 Internal Server Error when adding .htaccess file on root of MAMP

I'm getting a 500 Internal Server Error when I add an .htaccess file to the root of my site on MAMP. I have a virtual host set up, so the site is accessable through site.dev and my files live in /Users/Dan/Websites/site. There isn't any .htaccess files above the my current directory. At first, I thought it was something going on inside of my file, but I removed everything except for a commented line and the error is still there. When I have a blank file, the error goes away.
Update: Here's the error log
[Mon Apr 01 11:17:18 2013] [alert] [client 127.0.0.1] /Users/Dan/Websites/site/.htaccess: Invalid command '\xff\xfe#', perhaps misspelled or defined by a module not included in the server configuration
Any ideas?
\xff\xfe is the byte-order marker (BOM) for UTF-16. There's nothing wrong with that but Apache doesn't seem to support BOMs at all. So you'll need to save your .htaccess file with a different encoding, either a single-byte one or UTF-8 without BOM.

What can I fix to avoid this error in apache error log: "File does not exist: /www/site/[object Object]:,"?

I have many errors in my apache error log like this:
[Mon Mar 26 08:12:52 2012] [error] [client 92.xx.xxx.xxx] File does not exist: /www/site/[object Object]:, referer: http://site.com/
I can't figure out, what makes this error.
How can i fix this?
My Apache version is 2.2.9
Check to see if the files referenced in your logs are files that you think exist or should exist on your site. If the files are files that you think should be on your site, then you might have some incorrect links in some of you pages. You can use a web crawler to check this.
If the pages referred to in the messages are things like ".../cmd.exe" or other pages that are not and never were on your site, then these log entries probably represent probes from bots looking for known exploits in some versions of some web servers. There is not much you can do about this. Welcome to the Internet.
If the client address for many of the requests is the same over a period of an hour or more, you are best advised to block that particular IP address at your external firewall.

Apache error log - file does not exist

I am receiving some mysterious errors in my apache error log.
For example:
File does not exist: /home/httpd/vhosts/studentlife.co.il/httpdocs/help_center/div.hot-jobs
File does not exist: /home/httpd/vhosts/studentlife.co.il/httpdocs/solutions/function.filesize
File does not exist: /home/httpd/vhosts/studentlife.co.il/httpdocs/work_abroad/div.publish
Now I don't understand - how did my divs and functions suddenly turn into files?? Of course they do not exist, they are divs and functions written in the code. So I am not sure why I am getting these file does not exist errors.
Also, how can I debug this, since in no place am I trying to access files with these names?
Any insight will be great.
I would say don't worry about it.
I can make a request for /the/answer/to/life/the/universe/and/everything.42 and it would show up in your error log.
Probably some spider is hunting for vulnerabilities in your site and it's randomly trying URLs. If you see the same pages a lot then start checking to see whether you have any broken links, otherwise forget about it.
You could use FireBug to see the return codes (you are looking for 404) of all HTTP requests made when you open your website. Maybe you have some typo in your HTML.
I had this same issue in this scenario:
wamp installation
system was running perfectly til dec 01/2010.
restarted computer on dec 02/2010.
apache wouldn't start up and was logging [Thu Dec 02 09:15:45 2010] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/announce
then, only then, I reminded myself I had just installed SKYPE on dec 01/2010 and that, on windows, we've got this conflict between the phone program and apache fighting for the port 80, I guess.
closed Skype, restarted services and voi là: my system is back. =)
One of my clients had a similar issue with Apache on Windows.
On any request he was getting:
[error] [client 192.168.1.66] File does not exist: D:/apache
I realized that the DocumentRoot was missing form the httpd.conf.
I agree with Gareth, a spider could be hunting for vulnerabilities in your site and it's randomly trying URLs. However, there may be another reason, probably more likely.
After debugging my own scripts to see what was going on, I noticed the following. The error of the form:
[Mon May 06 21:47:29 2013] [error] [client ip] File does not exist: /path/, referer: http://domain/example.html
is visible in the error log and even though it will sound weird, it does not have to do with the static HTML file or script that generates the page. In fact, the source of this problem may be the HTML of the page referencing a broken link to an image/css/js file, so that when the browser receives the HTML and fetches these resources Apache can't find them and prints the "File Does Not Exist" error.
It is nice of Apache as it warns us about broken links.