I have read a lot of information all over the Internet regarding this subject, and can not figure out what I'am doing wrong. I'm trying to host two websites under different names locally under Windows 7 with Apaches Virtual Hosting functionality. This is what I have done already:In the httpd.conf file I uncommented the following line, so that the virtual host configuration file will be included in the main configuration sequence.# Virtual hostsInclude conf/extra/httpd-vhosts.confThis is how I edited my httpd-vhosts.conf:## Virtual Hosts## If you want to maintain multiple domains/hostnames on your# machine you can setup VirtualHost containers for them. Most configurations# use only name-based virtual hosts so the server doesn't need to worry about# IP addresses. This is indicated by the asterisks in the directives below.## Please see the documentation at # <URL:http://httpd.apache.org/docs/2.2/vhosts/># for further details before you try to setup virtual hosts.## You may use the command line option '-S' to verify your virtual host# configuration.## Use name-based virtual hosting.#NameVirtualHost *:80## VirtualHost example:# Almost any Apache directive may go into a VirtualHost container.# The first VirtualHost section is used for all requests that do not# match a ServerName or ServerAlias in any <VirtualHost> block.##<VirtualHost *:80>#    ServerAdmin webmaster@dummy-host.localhost#    DocumentRoot C:/apache/docs/dummy-host.localhost#    ServerName dummy-host.localhost#    ServerAlias www.dummy-host.localhost#    ErrorLog logs/dummy-host.localhost-error.log#    CustomLog logs/dummy-host.localhost-access.log common#</VirtualHost>##<VirtualHost *:80>#    ServerAdmin webmaster@dummy-host2.localhost#    DocumentRoot C:/apache/docs/dummy-host2.localhost#    ServerName dummy-host2.localhost#    ErrorLog logs/dummy-host2.localhost-error.log#    CustomLog logs/dummy-host2.localhost-access.log common#</VirtualHost><VirtualHost *:80> ServerName arterieur DocumentRoot J:/webcontent/www20 <Directory J:/webcontent/www20>  Order allow,deny  Allow from all </Directory></VirtualHost>As you can see I commented the Virtual Host examples out and added my own one (I did one for this example). Also am I sure that J:\webcontent\www20 exists.At last I edited the Windows host file located in: C:\Windows\System32\drivers\etc\hosts, now it looks this:# Copyright (c) 1993-2009 Microsoft Corp.## This is a sample HOSTS file used by Microsoft TCP/IP for Windows.## This file contains the mappings of IP addresses to host names. Each# entry should be kept on an individual line. The IP address should# be placed in the first column followed by the corresponding host name.# The IP address and the host name should be separated by at least one# space.## Additionally, comments (such as these) may be inserted on individual# lines or following the machine name denoted by a '#' symbol.## For example:##      102.54.94.97     rhino.acme.com          # source server#       38.25.63.10     x.acme.com              # x client host# localhost name resolution is handled within DNS itself.#   127.0.0.1       localhost#   ::1             localhost    127.0.0.1   arterieurThen I restarted Apache with the Apache Service Monitor, and it gave me the following fatal error: The requested operation has failed!, I tried to look at the apache/logs/error.log file but I did not log anything, I guess it only logs the errors after startup.Does anyone knows what I'am doing wrong?
Apache virtual host does not work properly
apache;virtualhost
Test your config with this commandline:httpd -tThis will tell any error in config files.Maybe you receive this error: ServerName takes one argument, the Host name and port of the server.Try to configure it like this:ServerName arterieur.localhostand in the hosts file add this:127.0.0.1   arterieur.localhostThis way is configured the way ServerName has to be configured.If this does not work, use ServerAlias instead of ServerName.And if this does not work, check that your Apache service is not disabled: Open services.msc and check the Apache service, make sure it's not disabled. It should be set to Manual or Automatic start-up, depending on your environment.EDIT: Now talking with questioner we reached an answer:The exact problem was that running httpd by service, the process don't had permissions to write to the J: drive, but when running it in commandline everything worked fine.As @Jori said, services.exe runs under SYSTEM user, so seems that running httpd by service inherits services.exe rights, so he changed J: drive permissions for user SYSTEM and then worked fine.