Go Back   Freelance UK Forums - Forum for UK Freelancers > Web Design Forum

Reply
 
LinkBack Thread Tools Display Modes
Old 07-14-2008, 08:43 PM   #1 (permalink)
New Poster
 
Join Date: Jul 2008
Posts: 1
Default setting u apache issue

I have read apache docs.

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 Software Foundation/Apache2.2/htdocs"
DocumentRoot "C:/operator1/oex-onmedias/primary"

So now apparently, when I type "http://www.onmedias.com/" in my browser, it would display C:/operator1/oex-onmedias/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?
cyjetsu is offline   Reply With Quote
Old 07-29-2008, 03:22 PM   #2 (permalink)
New Poster
 
Join Date: Feb 2008
Posts: 7
Default

Quote:
Originally Posted by cyjetsu View Post
I have read apache docs.

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 Software Foundation/Apache2.2/htdocs"
DocumentRoot "C:/operator1/oex-onmedias/primary"

So now apparently, when I type "http://www.onmedias.com/" in my browser, it would display C:/operator1/oex-onmedias/primary/index.html, but it does not work! Why?
This could be several reasons; it depends on the rest of the config file. However, first of all you can only define one DocumentRoot, so comment out or delete the first line (DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs").
You'll also need a bit in the configuration file that says:
<IfModule mod_dir.c>
DirectoryIndex index.html
</IfModule>


Quote:
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?
You need to look into Apache virtual hosts. They're quite easy to set up, but you [i]will[-i] need to read and understand the documentation first. Look at Apache Virtual Host documentation for more information.
wheelybird is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 11:11 PM.






LinkBacks Enabled by vBSEO © 2008, Crawlability, Inc.