If you encounter the Apache warning “[warn] NameVirtualHost *:80 has no VirtualHosts”, you can correct the problem by adjusting your VirtualHosts (or creating them if they don’t exist).
Your VirtualHost may look like this:
DocumentRoot /var/www/html
ServerName mysite.com
ScriptAlias /cgi-bin/ /var/www/html/cgi-bin/
ErrorLog logs/error_log
CustomLog logs/access_log combined
In order to use NamedVirtualHosts, you will need to specify port 80.
DocumentRoot /var/www/html
ServerName mysite.com
ScriptAlias /cgi-bin/ /var/www/html/cgi-bin/
ErrorLog logs/error_log
CustomLog logs/access_log combined
After doing so you can restart or reload Apache.
# service httpd (restart|reload)
