I'm trying to set up a development environment for a javascript web application using apache, but I can't seem to do even the simplest of things, like setting up a virtual host to serve the static html, js, and other file types.
Here's what I'm trying to do in httpd-vhosts.conf:
<VirtualHost *:80>
ServerAdmin test@localhost
ServerName www.nonlocal-blight.com
ServerAlias www.local-blight.com
DocumentRoot "/Apache24/documents/WebContent"
<Directory "WebContent">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
I've got an index.html
file in WebContent, but whether I try to go to www.local-blight.com, or www.local-blight.com/index.html, I always get "Oops! Google Chrome could not find [whatever]". I've tried removing the ServerAlias, a different folders for the Document root, removing the line Options Indexes FollowSymLinks
and everything.
I've tried using httpd.exe -S
to check my virtual host configuration, but so far as I can see, the output looks good:
C:\Apache24\bin>httpd.exe -S
VirtualHost configuration:
*:80 is a NameVirtualHost
default server www.nonlocal-blight.com (C:/Apache24/conf/extra/httpd-vh
osts.conf:37)
port 80 namevhost www.nonlocal-blight.com (C:/Apache24/conf/extra/httpd
-vhosts.conf:37)
alias www.local-blight.com
port 80 namevhost www.nonlocal-blight.com (C:/Apache24/conf/extra/httpd
-vhosts.conf:37)
alias www.local-blight.com
*:443 is a NameVirtualHost
default server localhost (C:/Apache24/conf/extra/httpd-sni.conf:134)
port 443 namevhost localhost (C:/Apache24/conf/extra/httpd-sni.conf:134
)
port 443 namevhost localhost (C:/Apache24/conf/extra/httpd-sni.conf:134
)
port 443 namevhost serverone.tld (C:/Apache24/conf/extra/httpd-sni.conf
:151)
port 443 namevhost serverone.tld (C:/Apache24/conf/extra/httpd-sni.conf
:151)
port 443 namevhost servertwo.tld (C:/Apache24/conf/extra/httpd-sni.conf
:166)
port 443 namevhost servertwo.tld (C:/Apache24/conf/extra/httpd-sni.conf
:166)
ServerRoot: "C:/Apache24"
Main DocumentRoot: "C:/Apache24/documents"
Main ErrorLog: "C:/Apache24/logs/error.log"
Mutex ssl-stapling: using_defaults
Mutex proxy: using_defaults
Mutex ssl-cache: u
sing_defaults
Mutex default: dir="C:/Apache24/logs/" mechanism=default
PidFile: "C:/Apache24/logs/httpd.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
Define: SRVROOT=/Apache24
Can anyone tell me what I'm doing wrong here?