I am trying to set up virtual hosts in Centos7. I followed this guide:
http://twohlix.com/2011/05/setting-up-apache-virtual-hosts-on-centos/
however I keep getting the following error:
Job for httpd.service failed. See 'systemctl status httpd.service' and 'journalctl -xn' `for details.`
the relevant output from journalctrl is as follows:
-- Unit httpd.service has begun starting up.
Aug 17 14:21:54 [8235]: AH00548: NameVirtualHost has no effect and will be removed in the next release
Aug 17 14:21:54 [1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Aug 17 14:21:54 [1]: Failed to start The Apache HTTP Server.
-- Subject: Unit httpd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
I cannot figure out what this can be. I have also tried to use a different method whereby the VirtualHost container is inside the httpd.conf file but still no luck. I am using the following configuration.
Server version: Apache/2.4.6 (CentOS)
Server built: Jul 23 2014 14:48:00
I have not configured DNS etc could this have an impact on it? This is the only other thing I could think of. Any help would be much appreciated I have spent the last couple of days trying to figure out what this could be but everything I tried failed.
/var/log/httpd/error_log.apachev2.2.