Apache 1.1.1 and multiple server ports

Apache 1.1.1 and multiple server ports

Post by Aleksandar Susnja » Tue, 03 Dec 1996 04:00:00



Hi!

        I have a problem with Apache 1.1.1 reporting wrong number of
server port used in SERVER_PORT variable. I am trying to set the
server to listen to all ports from 80 to 85, and I did this by
putting these lines in srm.conf

Port 80
Listen 80
Listen 81
Listen 82
Listen 83
Listen 84
Listen 85

        Note that without 'Listen 80' it did not want to listen to
port 80, but that is not the problem, at least not any more. The
problem is that Apache always reports port 80, even when other ports
are used. For example, if i lookup http://www.bktv.com/cgi-bin/test-cgi,
it reports:

CGI/1.0 test script report:

argc is 0. argv is .

SERVER_SOFTWARE = Apache/1.1.1
SERVER_NAME = www.bktv.com
GATEWAY_INTERFACE = CGI/1.1
SERVER_PROTOCOL = HTTP/1.0
SERVER_PORT = 80
REQUEST_METHOD = GET
HTTP_ACCEPT = image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
PATH_INFO =
PATH_TRANSLATED =
SCRIPT_NAME = /cgi-bin/test-cgi
QUERY_STRING =
REMOTE_HOST = gazda.bktv.com
REMOTE_ADDR = 194.247.204.163
REMOTE_USER =
AUTH_TYPE =
CONTENT_TYPE =
CONTENT_LENGTH =

... which is correct. On the other hand, if I tell the browser to use
another port, for example http://www.bktv.com:81/cgi-bin/test-cgi,
I get exactly the same thing (the port number did not change):

CGI/1.0 test script report:

argc is 0. argv is .

SERVER_SOFTWARE = Apache/1.1.1
SERVER_NAME = www.bktv.com
GATEWAY_INTERFACE = CGI/1.1
SERVER_PROTOCOL = HTTP/1.0
SERVER_PORT = 80
REQUEST_METHOD = GET
HTTP_ACCEPT = image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
PATH_INFO =
PATH_TRANSLATED =
SCRIPT_NAME = /cgi-bin/test-cgi
QUERY_STRING =
REMOTE_HOST = gazda.bktv.com
REMOTE_ADDR = 194.247.204.163
REMOTE_USER =
AUTH_TYPE =
CONTENT_TYPE =
CONTENT_LENGTH =

   I need this because I have to write HTML file parser which acts
differently, based on the port used. Does anybody know why does Apache
always report the base port!?

Aleksandar Susnjar,

P.S. You may try this yourself, we're on The Net, except for the
nights (local time, CET), for now.

 
 
 

Apache 1.1.1 and multiple server ports

Post by Michael Smit » Wed, 04 Dec 1996 04:00:00


Hi,

I can't guarantee this will fix your problem but I think you should use
either Port or Listen, not both.

Try taking out the Port line and see if that makes any difference.

Mike


>         I have a problem with Apache 1.1.1 reporting wrong number of
> server port used in SERVER_PORT variable. I am trying to set the
> server to listen to all ports from 80 to 85, and I did this by
> putting these lines in srm.conf

> Port 80
> Listen 80
> ...
> Listen 85


 
 
 

Apache 1.1.1 and multiple server ports

Post by Dave Panic » Tue, 10 Dec 1996 04:00:00



> Hi!

>         I have a problem with Apache 1.1.1 reporting wrong number of
> server port used in SERVER_PORT variable. I am trying to set the
> server to listen to all ports from 80 to 85, and I did this by
> putting these lines in srm.conf

> Port 80
> Listen 80
> Listen 81
> Listen 82
> Listen 83
> Listen 84
> Listen 85

>         Note that without 'Listen 80' it did not want to listen to
> port 80, but that is not the problem, at least not any more. The
> problem is that Apache always reports port 80, even when other ports
> are used. For example, if i lookup http://www.bktv.com/cgi-bin/test-cgi,
> it reports:

I am having the same problem-  I have tested this on a sand box machine
runnig Solaris 2.4 - works great with only Listen and no Port defined I
tried it on a 2.5 machine no go!  I have played with about everything &
can't figure it out.  Since my "virtual logs" are not being written to,
I assume the server is ignoring the VirutualHost directive.   Please
mail me with any suggestions - our news feed is behind.

many thanks, Dave Panich

 
 
 

Apache 1.1.1 and multiple server ports

Post by Richard Drag » Wed, 11 Dec 1996 04:00:00


Correct me if I'm wrong, but is'nt the port defined by the
clients browser ?
I'm using 8080 for my proxy and I get proxy connections on
8080, all other connections are on 80....

Also had the listen 80 problem ...

Regards

Richard Drage




> > Hi!

> >         I have a problem with Apache 1.1.1 reporting
wrong number of
> > server port used in SERVER_PORT variable. I am trying
to set the
> > server to listen to all ports from 80 to 85, and I did
this by
> > putting these lines in srm.conf

> > Port 80
> > Listen 80
> > Listen 81
> > Listen 82
> > Listen 83
> > Listen 84
> > Listen 85

> >         Note that without 'Listen 80' it did not want
to listen to
> > port 80, but that is not the problem, at least not any
more. The
> > problem is that Apache always reports port 80, even
when other ports
> > are used. For example, if i lookup

http://www.bktv.com/cgi-bin/test-cgi,

- Show quoted text -

Quote:> > it reports:

 
 
 

1. multiple hosts and multiple ports in apache 1.1.1

Under both Solaris 2.4 and Linux (tried 2.0.12, 2.0.13, 2.0.14 and now on
2.0.17) Apache 1.1.1, when configured with several virtual hosts (IP based)
it seems to fail to associate the incoming connection with the right config
data sometimes.  It reports the objects missing and logs in the wrong file
(I have each virtual host going to its own log file) so it looks a lot like
the destination IP address and/or the port number is being picked up wrong.

In the Solaris case, I have the main server address and 4 additional addresses
each listening on ports 80 and 280.  The additional addresses are all setup
to redirect to another server elsewhere (specific subdirectories for each).
The main server works OK on port 80 and not at all on port 280.  But the
redirected ones work fine on both 80 and 280.  I juggled the configuration
for a test and made different host/port combinations do different things
and it's always port 280 on the main IP address not recognized.

In the Linux case, I have the main server using ports 80, 280, and 1080,
as well as 2 additional hosts only doing port 80.  This one is more weird
because sometimes port 80 on the main address works and sometimes not.
The other addresses work.

Mail me if you want to see the config file(s).  I have everything put in
a single httpd.conf file instead of three files, for easier managing.  I
hope that isn't the cause of the problem.

--
Phil Howard KA9WGN             +---------------------------------------------+
Unix/Internet/System Admin     |  When freedom is outlawed....               |
CLR/Fast-Tax                   |          ....only outlaws will be free!     |

2. Shortcoming analysis?

3. Apache: server needs to listen to multiple ports

4. ndd parameters: update for Solaris 2.5

5. multiple apache httpds with multiple VirtualHosts on port 80?

6. Question about kill

7. Reverse proxy to multiple origin servers on multiple ports

8. Sony PCWA-C150S

9. Solution: multiple Apache log files, multiple args to env=, multiple conditions to CustomLog directive

10. Two ports, one Apache server per port

11. apache listen to port 80, another standalone apache+modssl listen port 443, not working..?!

12. Q: Apache does not respond w/multiple ports

13. Apache and multiple listening ports