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 releaseAug 17 14:21:54 [1]: httpd.service: main process exited, code=exited, status=1/FAILUREAug 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-develI 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:00I 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.
How can I set up Virtual Hosts in Centos7?
systemd;apache httpd;apache virtualhost
It's quite a minimal config for a basic virtual host.  Create a new config file in /etc/httpd/conf.d/ and name it (for example) after your domain.  It has to end in .conf though:# nano /etc/httpd/conf.d/example.net.conf<VirtualHost example.net:80>    DocumentRoot /var/www/example.net/</VirtualHost>Make sure there's viewable content in /var/www/example.netReload your webserver:# systemctl reload httpdMake sure you have example.net resolvable to your host's IP from the client and test.  Any errors should be in /var/log/httpd/error_log.