How to change the default error 404 site?

Alles, was den Apache betrifft, kann hier besprochen werden.

How to change the default error 404 site?

Postby Fauk » 23. April 2013 11:10

Hello Community,

I have already searched for about an hour now for an answer to how I change the default error 404 site on an Apache/2.2.22 (Ubuntu) Server. I found something with ErrorDocument, .htaccess. httpd.conf and so on. But nothing seems to work. Error Document simply doesn´t exist, or I haven´t found it. The httpd.conf only hase one line of code instead of many more, like most sites suggest, and creating an .htaccess file in the root directory doesn´t work for me. Can someone pls explain to me how I can get rid of the default 404 Site on my apache web server? I have full access to the servers shell, as root, and it is not located on an external webspace.
Fauk
 
Posts: 2
Joined: 23. April 2013 11:05
Operating System: Windows 8

Re: How to change the default error 404 site?

Postby Nobbie » 23. April 2013 15:59

Fauk wrote:I found something with ErrorDocument, .htaccess. httpd.conf and so on. But nothing seems to work.


Yes, there is not much to say about. Did you read the original Apache Documentation?

Fauk wrote:Error Document simply doesn´t exist, or I haven´t found it.


"ErrorDocument" (one word - not two words) is a word, a property in the Apache configuration. It cannot "exist" or "not exist". If you apply the corresponding line with the approrpriate syntax (again, see Apache Documentation), it does what it should do.

Fauk wrote:The httpd.conf only hase one line of code instead of many more,


Dont mind about the contents of httpd.conf, it is on yourself, to add the lines you need.
Nobbie
 
Posts: 8775
Joined: 09. March 2008 13:04

Re: How to change the default error 404 site?

Postby Fauk » 24. April 2013 08:01

Well no Wonder that my search was in vain xD

I have now added the ErrorDocument codes into the apache2.conf file and it worked.

Thank you for helping me :)
Fauk
 
Posts: 2
Joined: 23. April 2013 11:05
Operating System: Windows 8


Return to Apache

Who is online

Users browsing this forum: No registered users and 3 guests