Solved

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

Posted on 2006-10-27
1
231 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

744 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now