Solved

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

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Linux server had an unexpected freeze. How to find out cause (sys logs)? 13 61
ftp to port 21 4 70
how to configure linux OS using Ubuntu 7 69
Samba 4, Users Permission, 5 68
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
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.
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.

730 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