Solved

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

Posted on 2006-10-27
1
243 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

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

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
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.

691 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