You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Hytham Shehab <hy...@menanet.net> on 2002/04/04 17:03:10 UTC

how to setup multiple virtual host with the same dynamic IP?

hi every one,
    am a web developer working at home, i got an idea of previewing my work
on multiple projects of web sites to bosses from my PC, then i do this: <Win
XP>

hosts
--
1.2.3.4        site_no_1

httpd.conf
--
<virtualhost 1.2.3.4>
blah blah
</virtualhost>
then i restart the apache, wll IT WORKS GREAT, but with one single virtual
host, how can i do things like that
hosts
--
1.2.3.4    site_no_1
1.2.3.4    site_no_2
...
1.2.3.4    site_no_x
so when ever one type 1.2.3.4 in his browser, it wll redirected to my PC,
but then there is still one important q, how can this guy redirected to the
specified web -virtual- site on my PC?
am i clear?, hope so.
any way, thx for reading all this shit.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: how to setup multiple virtual host with the same dynamic IP?

Posted by DL Neil <PH...@DandE.HomeChoice.co.uk>.
Joe/Hytham,

> You'll need to give the person connecting the whole path to the site
> you'd like them to see:
>
> http://1.2.3.4/site_no_1/
>
> http://1.2.3.4/site_no_2/
>
> Without a DNS server providing name service, you can't have a
name-based
> virtual host.  You could use the dyndns service to use domain names to
> map directly to the virtual servers, as well (the paid for kind,
> probably, since you'll be hosting multiple addresses).


I'm not sure that this last para is true (am not 'into' the
low-end/protocol level stuff). Before we had dynamic services all
addressing was done with static entries (and on each client). In
portable PC 'standalone' mode, we can still use this approach to achieve
'name serving'. Here's what I have done (WinNTWS 4.0 SP6a, Apache
1.3.20nt):

The HOSTS file's existing line has been amended to:

127.0.0.1       localhost pit hc collab docs

NB Pit (ie 'sandpit'), hc, collab(oration), and docs are all local
copies of web sites/vhosts, so in Apache's httpd.conf there are
corresponding entries, eg:

<VirtualHost 127.0.0.1>
    ServerName collab
    DocumentRoot "c:/Data/webs/COLLAB"
    ErrorLog logs/collabSite-error_log
    CustomLog logs/collabSite-access_log common
</VirtualHost>

Once these are set up, and the machine rebooted (and thus Apache
restarted) entering the vhost name into the browser gets back the home
page, eg:

http://collab

These v-sites won't be visible from the Internet, nor across a network
(unless you also/somehow set up naming on the client(s)), but they will
work in standalone mode/handle demonstrations (I use the method to
process PHP through Apache on my laptop regardless of connection to any
network or the Internet). I'm reasonably confident that it will work on
*nix systems.

Hytham: I think the only part you are missing is the HOSTS file!
Fee aman 'illah,
=dn



> Hytham Shehab wrote:
> > hi every one,
> >     am a web developer working at home, i got an idea of previewing
my work
> > on multiple projects of web sites to bosses from my PC, then i do
this: <Win
> > XP>
> >
> > hosts
> > --
> > 1.2.3.4        site_no_1
> >
> > httpd.conf
> > --
> > <virtualhost 1.2.3.4>
> > blah blah
> > </virtualhost>
> > then i restart the apache, wll IT WORKS GREAT, but with one single
virtual
> > host, how can i do things like that
> > hosts
> > --
> > 1.2.3.4    site_no_1
> > 1.2.3.4    site_no_2
> > ...
> > 1.2.3.4    site_no_x
> > so when ever one type 1.2.3.4 in his browser, it wll redirected to
my PC,
> > but then there is still one important q, how can this guy redirected
to the
> > specified web -virtual- site on my PC?
> > am i clear?, hope so.
> > any way, thx for reading all this shit.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: how to setup multiple virtual host with the same dynamic IP?

Posted by Admin-myispnet <ko...@naisp.net>.
try this service...

http://www.dyndns.org

Joe Cooper wrote:

> You'll need to give the person connecting the whole path to the site
> you'd like them to see:
>
> http://1.2.3.4/site_no_1/
>
> http://1.2.3.4/site_no_2/
>
> Without a DNS server providing name service, you can't have a name-based
> virtual host.  You could use the dyndns service to use domain names to
> map directly to the virtual servers, as well (the paid for kind,
> probably, since you'll be hosting multiple addresses).
>
> Hytham Shehab wrote:
> > hi every one,
> >     am a web developer working at home, i got an idea of previewing my work
> > on multiple projects of web sites to bosses from my PC, then i do this: <Win
> > XP>
> >
> > hosts
> > --
> > 1.2.3.4        site_no_1
> >
> > httpd.conf
> > --
> > <virtualhost 1.2.3.4>
> > blah blah
> > </virtualhost>
> > then i restart the apache, wll IT WORKS GREAT, but with one single virtual
> > host, how can i do things like that
> > hosts
> > --
> > 1.2.3.4    site_no_1
> > 1.2.3.4    site_no_2
> > ...
> > 1.2.3.4    site_no_x
> > so when ever one type 1.2.3.4 in his browser, it wll redirected to my PC,
> > but then there is still one important q, how can this guy redirected to the
> > specified web -virtual- site on my PC?
> > am i clear?, hope so.
> > any way, thx for reading all this shit.
> >
> >
> > ---------------------------------------------------------------------
> > The official User-To-User support forum of the Apache HTTP Server Project.
> > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
> >
> >
>
> --
> Joe Cooper <jo...@swelltech.com>
> http://www.swelltech.com
> Web Caching Appliances and Support
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org

--
<=========== http://www.myispnet.net ===============>
Kit Goins         ICQ# 7110071     admin@myispnet.net
Web Designer:     http://kitdesigns.myispcentral.net
Personal WebServer:       http://kompukit.dyndns.org
(Server Runs between M-F 6pm-12am,S+S 12pm-12am EST)



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: how to setup multiple virtual host with the same dynamic IP?

Posted by Joe Cooper <jo...@swelltech.com>.
You'll need to give the person connecting the whole path to the site 
you'd like them to see:

http://1.2.3.4/site_no_1/

http://1.2.3.4/site_no_2/

Without a DNS server providing name service, you can't have a name-based 
virtual host.  You could use the dyndns service to use domain names to 
map directly to the virtual servers, as well (the paid for kind, 
probably, since you'll be hosting multiple addresses).


Hytham Shehab wrote:
> hi every one,
>     am a web developer working at home, i got an idea of previewing my work
> on multiple projects of web sites to bosses from my PC, then i do this: <Win
> XP>
> 
> hosts
> --
> 1.2.3.4        site_no_1
> 
> httpd.conf
> --
> <virtualhost 1.2.3.4>
> blah blah
> </virtualhost>
> then i restart the apache, wll IT WORKS GREAT, but with one single virtual
> host, how can i do things like that
> hosts
> --
> 1.2.3.4    site_no_1
> 1.2.3.4    site_no_2
> ...
> 1.2.3.4    site_no_x
> so when ever one type 1.2.3.4 in his browser, it wll redirected to my PC,
> but then there is still one important q, how can this guy redirected to the
> specified web -virtual- site on my PC?
> am i clear?, hope so.
> any way, thx for reading all this shit.
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 
> 



-- 
Joe Cooper <jo...@swelltech.com>
http://www.swelltech.com
Web Caching Appliances and Support


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org