Solved

how to make apache see my website in a diff folder?

Posted on 2006-10-27
1
240 Views
Last Modified: 2010-04-20
HI,

I have a folder on my d: drive called d:\mysites for example.

How do I setup an alias so I can view my sites in the "mysites" directory??

In my Apache Config file (httpd.conf)

I have:

#
# 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 "someDriveLetter:/Inetpub/wwwroot"

I also want to use an alias and keep my document root the same as I have sites there as well.

I could easily move the code under the document root, but wanted to see if I could have code in two different areas and have it all served up under http://localhost


Any help appreciated.

-ws
0
Comment
Question by:Westside2004
1 Comment
 
LVL 14

Accepted Solution

by:
ygoutham earned 125 total points
ID: 17824634
i do not know about the windows setup but still am hazarding a guess.  there should be a directory called conf.d in your directory that has the httpd.conf (check one level up )

you can simply create a mysite.conf and add the following to that file.

# redirect to a folder which has all mysites folder

Alias /mysites   /path/to/mysites/in/a/different/folder


effectively, this will give you a redirect prompt.  you can access the alias so created with http://localhost/mysites/  which will be the above directory.

http://localhost shall continue to be your default folder.

am not sure with the windows setup again.  check if this works or else wait for someone else who knows the stuff to comment.

goutham
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question