Forum Moderators: phranque

Message Too Old, No Replies

cant setup root!

cant setup root!

         

cyjetsu

6:52 pm on Jul 14, 2008 (gmt 0)

10+ Year Member



I have read the sticky threads.

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]

g1smd

7:13 pm on Jul 14, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I use test.domain.com for my local box and www.domain.com for the live website.

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.

jdMorgan

7:17 pm on Jul 14, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



See the extensive Apache Virtual Hosting documentation and tutorials for a start. These subjects are quite complex, and not suitable for "general" questions is a forum venue.

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