fix apache2 restart bug and enable apache  mod_rewrite