First set up the httpd (web) service
$ yum install httpd
If httpd service is already installed, update the service
$ yum update httpd
Now, start the web server
$ service httpd start
Redirecting to /bin/systemctl start httpd.service
Check the status of the web server
$ service httpd status
(more…)
First step is to install dependencies
$ sudo yum groupinstall "Development Tools"
$ sudo yum install kernel-devel
Mount the Virtualbox Additions CD ISO. You should download the virtualbox additions iso from http://download.virtualbox.org/virtualbox/ depending on your version of Virtual Box.
$ sudo mkdir /media/cdrom/
$ sudo mount /dev/cdrom /media/cdrom/
$ cd /media/cdrom
$ sudo ./VBoxLinuxAdditions.run
Before this step, create a shared folder in your host system. Say for example, if you created a shared folder named "CentosShare" in the host system you will follow the steps given below to access the share from within Centos.
$ mkdir ~/share
$ mount -t vboxs CentosShare ~/share
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
Edit /etc/php.ini and add the timezone setting within the file. For a list of timezone settings, visit http://php.net/manual/en/timezones.php
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = America/New_York