Multiple doc Roots? Any guidance is appreciated.
Posted by: trixterj (---.30.118.70.cfl.res.rr.com)
Date: April 04, 2006 04:16PM

Hey I was hoping I could get some help. Im not expecting any one on one
instructions to waste your time, but I would appreciate it if you could point me
in the right direction possibly with a link or help file relating to this, since Im
unsure on how to figure it out. smiling smiley

I installed WAMP, switching from the custom setup of Apache and PHP.

In the previous custom setup of Apache and PHP:
I would simply go to httpd.conf and change the DocRoot
and another setting to the directory that I wanted to be displayed as my localhost.

Now in the current WAMP:
When I change the httpd.conf in WAMP and restard the services, it doesn't work.
It continues to go to the /www directory. I do the same as I did with my other
configuration but WAMP doesn't seem to approve.

I have several folders on another drive I prefer to work in that I can easily switch
back and forth. I tried the Alias setting but that didn't seem to do anything, or I
may be misunderstanding the use of it.


My setup is located at: C:/Server/.... (all in there)

My documents and folders are on D:/

Should I install WAMP on D:/ if my files I want to see are on that drive?
I did not have to do this with my previous installation.


I would be more than happy if this is possible:

[localhost] = D:/lostseed
[localhost] = D:/jream

I tried to make this plain and simple, quick and easy to read, if I am misunderstood
I apologize for my lack of experience in WAMP - I'm doing the best I can smiling smiley


Options: ReplyQuote
Re: Multiple doc Roots? Any guidance is appreciated.
Posted by: CyberSpatium (---.hsd1.or.comcast.net)
Date: April 04, 2006 09:38PM

You can install WAMP on whatever drive you want. Since you want a custom location for the DocumentRoot, there are a few places in httpd.conf that need to be updated.

You say you have already changed the documentroot setting in your httpd.conf file, so leave it as it is, but for others that may need help with the same issue, find this setting:
DocumentRoot "C:/wamp/www"

Change it to where ever your web files are located, like this below for example:
DocumentRoot "C:/Server/"

What you did not do was to update the directory settings for you new DocumentRoot location, so find this line:
<Directory "C:/wamp/www">

Change the location of this setting to the same location you made in the previuos setting.
<Directory "C:/Server/">

Now save the file, restart apache so the new settings will take effect, and now you have changed the default document root.

You also stated you would like to have
[localhost] = D:/lostseed

You can do this using alias’s. Go to this folder: c:/wamp/apache2/conf/alias and create a new text file called lostseed.conf. You can name the name the file whatever you want, and make sure it has a .conf extension.

Open up the conf file and add these bold lines to the file

Alias /lostseed/ "D:/lostseed/"

<Directory "D:/lostseed/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
Allow from 127.0.0.1
</Directory>


Save the file. Now add this line to very bottom of your httpd.conf file:
Include "c:/wamp/apache2/conf/alias/lostseed.conf”

These changes now make it so webpage’s are served from the D:/lostseed/ when someone accesses:
http://localhost/lostseed

You can also setup as many aliases as you want, so you can set an alias for:
[localhost] = D:/jream

Save all your files you edited, and restart apache again for the new settings to take effect.



Post Edited (04-04-06 21:46)

CyberSpatium
----------------------
WAMP Forum Admin

Web Development for Newbie's Blog - Check out my new blog. It is for web developers, and especially tailored for the web development newbie. If you are not fluent in “geek speak”, then this incredible resource is just you. And even if you are a web development pro, this is a great resource to check out some of the latest web development tips, news, tutorials, codes and more.

Options: ReplyQuote
Re: Multiple doc Roots? Any guidance is appreciated.
Posted by: sizzzzlerz (12.191.193.---)
Date: April 05, 2006 04:10PM

Totally cool, Cyber!

I've been wondering how to do this for a while but had yet to find such a clear written explanation and procedure as yours.

Thanks.


Options: ReplyQuote
Re: Multiple doc Roots? Any guidance is appreciated.
Posted by: CyberSpatium (---.hsd1.or.comcast.net)
Date: April 05, 2006 05:22PM

No prob sizzzzlerz

I try to make my answers as understandable as possible. I remember how much I hated it when I had to ask a support question somewhere before, and someone would reply but gave an answer that is so technical it is impossible to understand. Or they would give a short answer that does not answer my question in any way. So, when I reply to a post requesting support here, I try to combine my own experience trying to get support with experience with apache, php, and mysql and try to make it as easy to understand as possible.

Options: ReplyQuote
Re: Multiple doc Roots? Any guidance is appreciated.
Posted by: trixterj (---.30.118.70.cfl.res.rr.com)
Date: April 05, 2006 07:51PM

Man, I appreciate your help but I am really troubled. It seems so simple,
I have no idea whats wrong. I uninstalled everything and reinstalled WAMP
for a fresh install. I added it by hand first, it wouldn't run, I even closed and
restarted WAMP. I also reinstalled WAMP again, and used the ALIAS setting
which created the same files that I did by hand you told me to.

Im not concerned about where my document root is, I just want aliases to
work because thats where Ill be for the most part.

But here is all that I have.

First File

---------------------------------------------------------
httpd.conf
---------------------------------------------------------
DocumentRoot "C:/Server"
<Directory "C:/Server">
---------------------------------------------------------

Next File

---------------------------------------------------------
lostseed.conf
---------------------------------------------------------
Alias /lostseed/ "d:/lostseed/"

<Directory "d:/lostseed/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
Allow from all
</Directory>
---------------------------------------------------------

I go to either:
[127.0.0.1] or [localhost]

and

Here is the Error I get
---------------------------------------------------------
500 Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.
Apache/2.0.55 (Win32) PHP/5.1.2 Server at 127.0.0.1 Port 80
---------------------------------------------------------

the localhost works, but alias's won't work, I have no clue what Im doing wrong sad smiley


Options: ReplyQuote
Re: Multiple doc Roots? Any guidance is appreciated.
Posted by: CyberSpatium (---.hsd1.or.comcast.net)
Date: April 05, 2006 09:01PM

trixterj,

Don’t worry, you just forgot to add this line to very bottom of your httpd.conf file:
Include "c:/wamp/apache2/conf/alias/lostseed.conf”

Since you forgot to add that setting to httpd.conf file, apache finds that that there is no/alias and will trigger and error message.

Options: ReplyQuote
Re: Multiple doc Roots? Any guidance is appreciated.
Posted by: roms (---.fbx.proxad.net)
Date: April 05, 2006 09:41PM

Humm...

you could also use the alias function in the WAMP menu, it creates everything for you...

Romain



Romain

Options: ReplyQuote
Re: Multiple doc Roots? Any guidance is appreciated.
Posted by: trixterj (---.30.118.70.cfl.res.rr.com)
Date: April 06, 2006 12:10PM

Sorry I didnt mention that part, it is in my httpd.conf

Include "C:/Server/wamp/apache2/conf/alias/lostseed.conf"

These are all the settings I had before, I used what Romain suggested earlier as
well and it did make this, I am really puzzled why it wont work.

My default Aliases work (MySQL and PHPmyADMIN) though they are under the
C:/Server Directory.

Are you sure you can do this ALIAS'ing under a different directory, even a hard drive?

Options: ReplyQuote
Re: Multiple doc Roots? Any guidance is appreciated.
Posted by: CyberSpatium (---.hsd1.or.comcast.net)
Date: April 06, 2006 02:24PM

you can use an alias from anywhere on your computer, any hard drive, any folder

Options: ReplyQuote
Re: Multiple doc Roots? Any guidance is appreciated.
Posted by: trixterj (---.30.118.70.cfl.res.rr.com)
Date: April 07, 2006 10:52PM

It was my .htaccess file guys!

In D:/LostSeed I have a custom .htaccess file for my actual webserver which
i dont need to change. So I just remove that and let the WAMP make its own.

Sheesh that was bugging me.

Thanks all for your help! WAMP Works and this is AWESOME smiling smiley

Just one more question, how come they won't execute the PHP scripts?



Post Edited (04-07-06 23:04)

Options: ReplyQuote


Sorry, only registered users may post in this forum.