Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

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 ( [id://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. www.my.address.com $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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2024-04-23 20:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found