Only run apache specific commands in ubuntu env and restart the httpd service in fedora.