Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re^3: (2) to $Env{'HTTP_HOST'} or to $Env{'SERVER_NAME'}, that is the question.

by Anonymous Monk
on Oct 13, 2020 at 07:46 UTC ( #11122761=note: print w/replies, xml ) Need Help??

in reply to Re: (dkubb) Re: (2) to $Env{'HTTP_HOST'} or to $Env{'SERVER_NAME'}, that is the question.
in thread to $Env{'HTTP_HOST'} or to $Env{'SERVER_NAME'}, that is the question.

Perhaps something has changed in all these years: using PERL 5.14 and Apache virtual hosting all of these gives you a different result:

$CGI->virtual_host() returns DNS name ex. $ENV{'SERVER_NAME'} returns "localhost" $ENV{'HTTP_HOST'} returns "localhost:8001"

The actual values of course depends on you environment setting.

  • Comment on Re^3: (2) to $Env{'HTTP_HOST'} or to $Env{'SERVER_NAME'}, that is the question.
  • Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11122761]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (2)
As of 2020-12-05 12:39 GMT
Find Nodes?
    Voting Booth?
    How often do you use taint mode?

    Results (63 votes). Check out past polls.