Gossamer Forum
Home : General : Internet Technologies :

Apache Config

Quote Reply
Apache Config
Hi, how can i change the root directory for apache. Eg, i specify an image /myimages.jpg this would go to the default root directory and then look for myimages.jpg but i want to to go to new/myimages.jpg but i just want to put in /myimages.jpg so i need to configure the folder 'new' to be my default root directory. How do i do this? Which bit do i change in the config file?

Thanks

Jamie
Quote Reply
Re: [jamieharrop14] Apache Config In reply to
If you want to change your DocumentRoot completely to go to that directory, you can use:

# 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 "/directory/new"

OR the better thing to do is configure an "Alias"

# Aliases: Add here as many aliases as you need (with no limit). The format is
# Alias fakename realname
#
# Note that if you include a trailing / on fakename then the server will
# require it to be present in the URL. So "/icons" isn't aliased in this
# example, only "/icons/". If the fakename is slash-terminated, then the
# realname must also be slash terminated, and if the fakename omits the
# trailing slash, the realname must also omit it.
#
# We include the /icons/ alias for FancyIndexed directory listings. If you
# do not use FancyIndexing, you may comment this out.
#
Alias /new/ "C:/directory/new"

Fore more info: http://www.apache.org/

Hope this helps.
========================================
Buh Bye!

Cheers,
Me

Last edited by:

Stealth: May 4, 2003, 5:51 PM