Documentroot on separate local disc
Posted by: Tata (---.87-197-113.telecom.sk)
Date: February 03, 2010 08:29PM

I use WAMP as my localhost since its version 1.7x. During older installations there was a choice, where shall the webdocuments be stored. So I used to set this directory located on another local disc.
Now there is this choice nowhere. I tried to edit httpd.conf and php.ini. Nothing helps. I still get to the www directory located on C:\wamp\www.
Please, what and where shall I change if the installation shall remain on drive C: and the entire disc D: shall be used as my local webspace.

Options: ReplyQuote
Re: Documentroot on separate local disc
Posted by: c2dan (---.15-1.cable.virginmedia.com)
Date: February 03, 2010 09:00PM

Left click WAMP tray icon and choose Apache > httpd.conf

Find these lines
DocumentRoot "c:/wamp/www/"

<Directory "c:/wamp/www/">
Change C:/wamp/www/ to your new destination. Save httpd.conf and restart Apache.



Edited 1 time(s). Last edit at 02/03/2010 09:00PM by c2dan.

Options: ReplyQuote
Re: Documentroot on separate local disc
Posted by: pastorP (---.dsl.cavtel.net)
Date: February 04, 2010 05:40AM

How would you this this if you are hosting three different sites with different content and only one IP address? each folder holding a different site.

Options: ReplyQuote
Re: Documentroot on separate local disc
Posted by: stevenmartin99 (---.b-ras2.blp.dublin.eircom.net)
Date: February 04, 2010 06:00AM

using vhosts in apache > [httpd.apache.org]

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Documentroot on separate local disc
Posted by: pastorP (---.dsl.cavtel.net)
Date: February 04, 2010 06:47AM

I have looked at that page and I must be missing something.

What ends up happening is both domains end up with the same page from the same site when they are two different websites with two different domains.
Now when I edit the Host file it still ends up serving the same page when I place different file folders.

>Listen 80
Listen 8081

NameVirtualHost 172.20.30.40:80
NameVirtualHost 172.20.30.40:8081

<VirtualHost 172.20.30.40:80>
ServerName www.example1.com
DocumentRoot /www/domain-80
</VirtualHost>

<VirtualHost 172.20.30.40:8081>
ServerName www.example2.com
DocumentRoot /www/domain-8081
</VirtualHost>

<VirtualHost *:80>
ServerName localhost
DocumentRoot c:/wamp/www/
</VirtualHost>

<end of code
Now does this go in the httpd-vhosts.conf just as it is? or is the listen command to go into the conf file?

Options: ReplyQuote
Re: Documentroot on separate local disc
Posted by: stevenmartin99 (---.b-ras2.blp.dublin.eircom.net)
Date: February 04, 2010 07:02AM

NameVirtualHost *:80

<VirtualHost *:80>
ServerName www.example1.com
DocumentRoot /www/domain1
</VirtualHost>

<VirtualHost *:80>
ServerName www.example2.com
DocumentRoot /www/domain2
</VirtualHost>

<VirtualHost *:80>
ServerName localhost
DocumentRoot c:/wamp/www/
</VirtualHost>



just this code... u dont want to use different ports.. so make the folder domain1 and domain2 and put this code in the extra/httpd-vhosts.conf

and make sure remove the ; in front of the line in the httpd.conf about

;include extra/httpd-vhosts.conf

=

include extra/httpd-vhosts.conf


save and restart wamp

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Documentroot on separate local disc
Posted by: pastorP (---.dsl.cavtel.net)
Date: February 04, 2010 07:34AM

I did it that way too and still the same thing.

I started with wamp just hosting one site. So I used the www folder for that one site. Now I am trying to host two different sites while still trying to keep the old site up till i get the new one finished and still trying to work on the new site other domain.

So I had domain 1(Newsite old domain)
domain 2 folders (newsite new domain)
as well as the old site in www. (oldsite old domain)

When I place the code in Vhost and went to the site. It showed the old site and when I click on the other domain it showed the old site and not the new content.
I have tried this about 10 different ways and maybe I am missing something. I just can not figure it out. Iooked at your manual and JLBN as well. I am missing something.

Options: ReplyQuote
Re: Documentroot on separate local disc
Posted by: Tata (---.87-197-122.telecom.sk)
Date: February 04, 2010 07:48AM

I didn't make nothing else as reccommended in wirst answer to my post (only the changes in httpd.conf.
1. WAMP is installed in C:/wamp.
2. My webspace is on D:/
3. I copied the index.php from C:/wamp/www to D:/
4. Editted D;/index.php and changed:
[11] //chemin jusqu'au fichier de conf de WampServer
[12] $wampConfFile = '../wampmanager.conf';

to

[11] //chemin jusqu'au fichier de conf de WampServer
[12] $wampConfFile = 'C:/wamp/wampmanager.conf';

Now calling the localhost I get the wamp-index-page about like this:

Server Configuration
Tools
Your Projects
.......[domain1]
.......[domain2]
.......[domain3]

Your Aliases

and everything works just well.

Options: ReplyQuote
Re: Documentroot on separate local disc
Posted by: pastorP (---.dsl.cavtel.net)
Date: February 04, 2010 04:07PM

Does the command for the document root come from Vhost or the HTTPd? Because for some reason it keeps showing the old old site on all of the domains that we have no matter what I put in Vhost it shows the old site.

Options: ReplyQuote
Re: Documentroot on separate local disc
Posted by: stevenmartin99 (---.b-ras2.blp.dublin.eircom.net)
Date: February 04, 2010 04:12PM

comes from the vhost

use a full path instead of a relative path

DocumentRoot "c:/wamp/www"

DocumentRoot "c:/wamp/www/domain1"

DocumentRoot "c:/wamp/www/domain2"

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Documentroot on separate local disc
Posted by: pastorP (---.dsl.cavtel.net)
Date: February 04, 2010 05:06PM

Yes we have set everything to relative path as out lined. Still the same thing. what else could it be? I just emailed you for a invite to chat.

Options: ReplyQuote
Re: Documentroot on separate local disc
Posted by: stevenmartin99 (---.b-ras2.blp.dublin.eircom.net)
Date: February 04, 2010 05:11PM

i said dont use relative path

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Documentroot on separate local disc
Posted by: pastorP (---.dsl.cavtel.net)
Date: February 04, 2010 07:51PM

What I discovered is that my url is coming up like this.
www.example1.com/example1.com
the other is
www.example2.com/example2.com.
When I go on the web if I put it in just like that then the page comes up. So how do I get the last part out?

Options: ReplyQuote
Re: Documentroot on separate local disc
Posted by: c2dan (---.15-1.cable.virginmedia.com)
Date: February 04, 2010 07:55PM

How are you setting up vhosts. Post full code

Options: ReplyQuote
Re: Documentroot on separate local disc
Posted by: pastorP (---.dsl.cavtel.net)
Date: February 04, 2010 08:35PM

NameVirtualHost *:80

<VirtualHost *:80>
ServerName www.h.org
DocumentRoot "C:/wamp/www/h.org"
</VirtualHost>

<VirtualHost *:80>
ServerName www.e.org
DocumentRoot "C:/wamp/www/e.org"
</VirtualHost>

<VirtualHost *:80>
ServerName localhost
DocumentRoot "C:/wamp/www"
</VirtualHost>

Options: ReplyQuote
Re: Documentroot on separate local disc
Posted by: stevenmartin99 (---.b-ras2.blp.dublin.eircom.net)
Date: February 04, 2010 08:51PM

i told you,, its mod rewrite thats changing it back to localhost

you need to modify the BASE URL in concrete5

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Documentroot on separate local disc
Posted by: pastorP (---.dsl.cavtel.net)
Date: February 04, 2010 11:43PM

ok I cleared the Base URL and it is working on local host but not on the net.

Options: ReplyQuote
Re: Documentroot on separate local disc
Posted by: stevenmartin99 (---.b-ras2.blp.dublin.eircom.net)
Date: February 05, 2010 12:03AM

cleared it?
i told u - put in your website name!

it cant work on both... get it to only work on net

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Documentroot on separate local disc
Posted by: pastorP (---.dsl.cavtel.net)
Date: February 05, 2010 02:11AM

Ok I had the website name in the base url. it was serving the same pages from the same directory.
Now could the problem be in the Rewrite mod?

Options: ReplyQuote


Sorry, only registered users may post in this forum.