refactor configuration setup for apache/php-fpm