You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by John Iliffe <jo...@iliffe.ca> on 2023/08/02 01:07:12 UTC

[users@httpd] How can I force a server name header?

I'm trying to test a new server located at internal IP 192.168.1.5.  The
production server lives at IP 192.168.1.7 on the same network.  

How can I force the browser to connect to the correct server?  If I try
"http://192.168.1.5" the redirect on the first (alphabetically) virtual
server redirects to the production server.  

What I need to be able to do is combine the virtual server id with the
network address so I connect to the same name but on the machine I'm
testing.  I think this is the "ServerName" header but I don't know where
I can enter this on Firefox.

Anybody have any experience with this problem?

Thanks in advance.

John
======

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] How can I force a server name header?

Posted by John Iliffe <jo...@iliffe.ca>.
Thanks Frank.  My workstation just crashed; second time since 14 July, 
so I won't

be able to get back to this very fast.  I'll try it out whenever I can 
get back to work

but I do  appreciate the feedback.


John

======


On Wednesday 02/08/2023 at 12:17 am, Frank Gingras  wrote:
>
> http://ip/ will always land on the default (first) vhost unless you 
> have another vhost with ServerName IP set. Just set up an arbitrary 
> hostname to resolve to 192.168.1.7, then use http://dummyhostname/. 
> Make sure to define a vhost with that ServerName set as well.
>
> I would encourage you to look at the name-based vhosts docs, too.
>
>
> On Tue, Aug 1, 2023 at 9:08 PM John Iliffe <jo...@iliffe.ca> 
> wrote:
>>
>> I'm trying to test a new server located at internal IP 192.168.1.5.  
>> The
>> production server lives at IP 192.168.1.7 on the same network.
>>
>> How can I force the browser to connect to the correct server?  If I 
>> try
>> "http://192.168.1.5" the redirect on the first (alphabetically) 
>> virtual
>> server redirects to the production server.
>>
>> What I need to be able to do is combine the virtual server id with the
>> network address so I connect to the same name but on the machine I'm
>> testing.  I think this is the "ServerName" header but I don't know 
>> where
>> I can enter this on Firefox.
>>
>> Anybody have any experience with this problem?
>>
>> Thanks in advance.
>>
>> John
>> ======
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>


Re: [users@httpd] How can I force a server name header?

Posted by Frank Gingras <th...@apache.org>.
http://ip/ will always land on the default (first) vhost unless you have
another vhost with ServerName IP set. Just set up an arbitrary hostname to
resolve to 192.168.1.7, then use http://dummyhostname/. Make sure to define
a vhost with that ServerName set as well.

I would encourage you to look at the name-based vhosts docs, too.

On Tue, Aug 1, 2023 at 9:08 PM John Iliffe <jo...@iliffe.ca> wrote:

> I'm trying to test a new server located at internal IP 192.168.1.5.  The
> production server lives at IP 192.168.1.7 on the same network.
>
> How can I force the browser to connect to the correct server?  If I try
> "http://192.168.1.5" the redirect on the first (alphabetically) virtual
> server redirects to the production server.
>
> What I need to be able to do is combine the virtual server id with the
> network address so I connect to the same name but on the machine I'm
> testing.  I think this is the "ServerName" header but I don't know where
> I can enter this on Firefox.
>
> Anybody have any experience with this problem?
>
> Thanks in advance.
>
> John
> ======
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Re: [users@httpd] RE: *****SPAM***** [users@httpd] How can I force a server nameheader?

Posted by John Iliffe <jo...@iliffe.ca>.
Thanks Marc. That might be difficult to do due to some technical

limitations.  I will try it out as soon as I get a working 
workstation.

John

======


On Wednesday 02/08/2023 at 3:03 am, Marc  wrote:
>>
>>
>> I'm trying to test a new server located at internal IP 192.168.1.5.  
>> The
>> production server lives at IP 192.168.1.7 on the same network.
>>
>> How can I force the browser to connect to the correct server?  If I 
>> try
>> "http://192.168.1.5" the redirect on the first (alphabetically) 
>> virtual
>> server redirects to the production server.
>>
>> What I need to be able to do is combine the virtual server id with the
>> network address so I connect to the same name but on the machine I'm
>> testing.  I think this is the "ServerName" header but I don't know 
>> where
>> I can enter this on Firefox.
>>
>> Anybody have any experience with this problem?
>
> Put in the /etc/hosts or c:\windows\system32\drivers\etc\hosts
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] RE: *****SPAM***** [users@httpd] How can I force a server name header?

Posted by Marc <Ma...@f1-outsourcing.eu>.
> 
> I'm trying to test a new server located at internal IP 192.168.1.5.  The
> production server lives at IP 192.168.1.7 on the same network.
> 
> How can I force the browser to connect to the correct server?  If I try
> "http://192.168.1.5" the redirect on the first (alphabetically) virtual
> server redirects to the production server.
> 
> What I need to be able to do is combine the virtual server id with the
> network address so I connect to the same name but on the machine I'm
> testing.  I think this is the "ServerName" header but I don't know where
> I can enter this on Firefox.
> 
> Anybody have any experience with this problem?

Put in the /etc/hosts or c:\windows\system32\drivers\etc\hosts


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org