CentOS Apache, and notes - mhulse/mhulse.github.io GitHub Wiki

Configuration files live in /etc/httpd.

Create virtual host directories in the /var/www/html directory. Reserve private and/or secure data for the /var/www/ parent directory.

Restart Apache using:

$ apachectl start
$ apachectl stop
$ apachectl restart

Tail the server error logs:

$ tail -f /var/log/httpd/error_log

Install php

If needed:

$ which php
# If not found, you can use yum to install:
$ sudo yum install php php-mysql
# A restart is required:
$ apachectl restart