apache tutorial - PHP Development Virtual Host - apache - apache web server - apache server - apache2




PHP Development Virtual Host in Apache

This is an example on how to control PHP error logging in a virtual host site for development and debugging. Assumptions

  • The PHP module has been installed.
  • Development environment is not for production.
<VirtualHost *:80>
    ServerName example.com
    DocumentRoot /var/www/domains/example.com/html
    ErrorLog /var/www/domains/example.com/apache.error.log
    CustomLog /var/www/domains/example.com/apache.access.log common
    php_flag log_errors on
    php_flag display_errors on
    php_value error_reporting 2147483647
    php_value error_log /var/www/domains/example.com/php.error.log
</VirtualHost>
click below button to copy the code. By Apache tutorial team

Note: The Virtual Host configuration is for development only because the display_errors is enabled and you do not want that in production.


Related Searches to PHP Development Virtual Host in Apache

Adblocker detected! Please consider reading this notice.

We've detected that you are using AdBlock Plus or some other adblocking software which is preventing the page from fully loading.

We don't have any banner, Flash, animation, obnoxious sound, or popup ad. We do not implement these annoying types of ads!

We need money to operate the site, and almost all of it comes from our online advertising.

Please add wikitechy.com to your ad blocking whitelist or disable your adblocking software.

×