Forum Moderators: phranque
I have entered document root:
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "C:/Program Files/Apache Sexample/primary"
So now apparently, when I type "http://www.example.com/" in my browser, it would display C:/operator1/oex-example/primary/index.html, but it does not work! Why?
Another question, how would I then be able to browse my actual website on my web host after I have uploaded it to my online server if the url is the same? it would only take me to the local server.
Last question, how would I set up multiple local websites on apache? Do I need to do a new apache install for each website? Or if not, how do I divide doc-root urls and domains of multiple sites in my config file?
[edited by: jdMorgan at 7:18 pm (utc) on July 14, 2008]
[edit reason] example.com [/edit]
The local box can also be got through localhost/ or 127.0.0.1/ too.
You can set up as many sites as you like with one copy of Apache.
Check the manual for the exact syntax, but you define a virtual host with the required domain name and the associated folder on the hard drive where it will reside.
You'll need either DNS or your local HOSTS file to define the IP for where to go for each domain request.
You will also need to look into setting up DNS -- both in your local 'test' network, and for your real, hosted site. Local DNS is often done simply by adding hostname entries to the 'hosts' file on your local computers -- The location of this file varies according to operating system, but its name 'hosts' and format are always the same.
Jim