Edit Apache configuration file for your site setting. It may be httpd.conf or a virtual host file that ends with .conf specific to your site.
Add the below line with the host file and give the correct path for the error message page.
ErrorDocument 404 /404.html
If you do not want to create a custom page to showcase the error message, you can simply add the error message in the configuration file
ErrorDocument 404 “404 – Page not found.“
Error status codes on the client side
400 – Bad Request
401 – Unauthorized
402 – Payment Required
403 – Forbidden
404 – Not Found
405 – Method Not Allowed
406 – Not Acceptable
407 – Proxy Authentication Required
408 – Request Timeout
409 – Conflict
410 – Gone
411 – Length Required
412 – Precondition Failed
413 – Request Entity Too Large
414 – Request-URI Too Long
415 – Unsupported Media Type
416 – Requested Range Not Satisfiable
417 – Expectation Failed
Error status codes shown from server
500 – Internal Server Error
501 – Not Implemented
502 – Bad Gateway
503 – Service Unavailable
504 – Gateway Timeout
505 – HTTP Version Not Supported
Apache server is installed by default on Mac. Access the configuration settings for Apache by going to
$ cd /etc/apache2/
$ vi httpd.conf
To enable php, edit httpd.conf and uncomment the line
#LoadModule php5_module libexec/apache2/libphp5.so
Uncomment other lines that you may want to load in your system. As you are enabling PHP in your system, you may want to change the DirectoryIndex to
DirectoryIndex index.php index.html
Default group/user settings inside Apache on Mac is _www:_www
To setup Rails on windows after Ruby and Rails setup,
i) Edit hosts file in windows environment and set the server name in the hosts file to
In this example, i have used “myrails” as the server name for the project.
ii) Edit httpd configuration setting on WAMP to make sure proxy and proxy_http module is turned on (check if it those lines are not commented out)
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
Apache Error log shows the message “Client denied by server configuration” and the user sees “Forbidden Access” when they try to visit a web page.
Search for the apache configuration file (httpd.conf or vhosts.conf if you have configured a virtual host). Check for the directory permission set for the document root of the web site in question and do the following changes. Continue Reading…
CakePHP commonly known as ‘Cake’ is easy to install and faster to configure. It needs Apache (with mod_rewrite enabled), Php 4.3.2 or higher, MySQL/PostgreSQL/other ODBC, ADODB compliant databases.
XAMPP by ApacheFriends or MAMP has a complete installation of the above products which is an ultimate time saver. But, you should prefer installing each software individually in order to get a grip on the subject.
You can download the latest release from http://cakeforge.org/frs/download.php/695/184.108.40.20662.tar.gz Continue Reading…
There will be a link in httpd.conf file stating the document root where all our web application files need to reside though there can be symbolic links pointing to other locations.[root@user Desktop]# vi /etc/httpd/conf/httpd.conf
Based on the configuration setting, we need to identify the location where we need to create folders that will serve as the root for the applications that we would want to host.
By default Apache service is turned off and a user need to turn it on by issuing the following command with root permissions. Continue Reading…