× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Brad,

Does your config contain the ServerName directive?

If it contains
ServerName [1]www.example.com

then Apache might interpreted it as using the default port:
ServerName [2]www.example.com:80

If so, try changing that directive to:
ServerName [3]www.example.com:81

Alan

P.S. HTTP_HOST is not completely reliable. It contains whatever header was
sent by the user, so it can be spoofed.

On 5/22/2012 1:39 PM, Bradley Stone wrote:

Alan,

SCRIPT_URI is blank (I don't show that as available) and HTTP_HOST
shows correctly.

I have searched and found others running Apache with this issue, but
it was some time ago. So I wonder if it's a bug that somehow
transferred over when IBM used Apache as a base for their HTTP server.

I still miss the CERN server. :)

I find it hard to believe that this has went without getting caught
for this long... I will keep looking.. thanks!

Brad
[4]www.bvstools.com

On Tue, May 22, 2012 at 11:26 AM, Alan Seiden [5]<alan@xxxxxxxxxxxxxx> wrote:

Brad,

For me, SERVER_PORT shows the correct port on 7.1.

What do SCRIPT_URI and HTTP_HOST contain?

Alan


--
Alan Seiden, PHP for IBM i Consultant and Advocate
PHP Lead Developer, new toolkit for IBM i
Zend Framework certified contributor
[6]http://www.alanseiden.com | [7]alan@xxxxxxxxxxxxxx

[8]http://alanseiden.com/tips
[9]http://twitter.com/alanseiden


On 5/22/2012 12:16 PM, Bradley Stone wrote:

I was putting together an application for a client and planned on
using the SERVER_PORT as part of the program to know if the requests
were internal or external (ie port 80 is external, outside the LAN
coming through the firewall) and something like port 81 is inside the
LAN.

So, created on instance that points to conf running port 80, and
another instance that points to conf running port 81.

Well, SERVER_PORT always returns port 80, no matter which server
instance I'm connecting to.

This is V5R4. I verified the same thing happens on my machine which
is also V5R4.

Any ideas? Thanks!

Brad

References

Visible links
1. http://www.example.com/
2. http://www.example.com:80/
3. http://www.example.com:81/
4. http://www.bvstools.com/
5. mailto:alan@xxxxxxxxxxxxxx
6. http://www.alanseiden.com/
7. mailto:alan@xxxxxxxxxxxxxx
8. http://alanseiden.com/tips
9. http://twitter.com/alanseiden

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.