Forum Moderators: phranque

Message Too Old, No Replies

Hosting Domain & Test Site on Localhost

Virtual Domain Problem

         

fullarmor

6:57 pm on Dec 2, 2004 (gmt 0)

10+ Year Member



Here is my question:

In the configuration file you get the default of localhost, first_domainhost, and second_domainhost and each of these has a document root.

I have hosted my domain http://www.example.com on the first host localhost root folder works good.

What I would like to do is use http://localhost as the second domain for a testing server using //www/second_domainhost root folder.

and sujestions how to do this.

[edited by: jdMorgan at 9:26 pm (utc) on Dec. 2, 2004]
[edit reason] Removed specifics per TOS [/edit]

coopster

11:06 pm on Dec 2, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, fullarmor.

You mean like Apache's Virtual Hosts [httpd.apache.org]?

fullarmor

10:42 pm on Dec 3, 2004 (gmt 0)

10+ Year Member



Unfortunately I think I wasn't too clear.

You know when you intall apache on a windows your able to access the virtual directories by using [localhost...] and so forth.

Well once you point your domain to the the first one ie:

<VirtualHost 10.1.2.3>

ServerAdmin webmaster@host.foo.com
DocumentRoot /www/docs/host.foo.com
ServerName host.foo.com
ErrorLog logs/host.foo.com-error_log
TransferLog logs/host.foo.com-access_log

</VirtualHost>

now how to do i set the next one to the localhost server address like:

<VirtualHost 127.0.0.1>
DocumentRoot /www/docs/testsite
</VirtualHost>

and if I do this will I be able to access it from

[localhost...]

?