What are the best practices for setting up PHP 5 as a module versus in CGI mode for vhost configurations?

When setting up PHP 5 as a module versus in CGI mode for vhost configurations, it is generally recommended to use PHP as a module for better performance and security. This is because PHP as a module runs within the web server process, while in CGI mode, PHP runs as a separate process, which can be less efficient and secure. To set up PHP 5 as a module in vhost configurations, you can use the following configuration in your Apache virtual host file: ```apache <VirtualHost *:80> ServerName example.com DocumentRoot /var/www/html <IfModule mod_php5.c> php_admin_flag engine on php_admin_value error_log /var/log/php_errors.log </IfModule> </VirtualHost> ```