(newbie. ) listen directive question?

(newbie. ) listen directive question?

Post by Duke » Sun, 01 Sep 2002 01:23:34



For the Listen directive....

The Apache online manual says:
Note that you may still require a Port directive so that URLs that
Apache generates that point to your server still work.

but what does this mean .. i dont get it.

why would the port directive be required to be mentioned, when the
listen directive takes care of both the ip addr. and the port?

 
 
 

(newbie. ) listen directive question?

Post by Joshua Sliv » Sun, 01 Sep 2002 03:01:16



> For the Listen directive....
> The Apache online manual says:
> Note that you may still require a Port directive so that URLs that
> Apache generates that point to your server still work.
> but what does this mean .. i dont get it.
> why would the port directive be required to be mentioned, when the
> listen directive takes care of both the ip addr. and the port?

Sometimes Apache needs to generate an absolute URL refering to your
server.  For example, if a client requests a directory without the
trailing slash, apache must send it a redirect that includes the
trailing slash.  This redirect must include the absolute URL of the
server.  To figure out what URL to use, apache looks at the ServerName
and Port directive (in 1.3; in 2.0 the ServerName directive covers
both functions).  Normally you should just set Port to the
same port number that you used in Listen.  The only exception
is people doing funny things with port-forwarding.

And the whole discussion is moot if you set "UseCanonicalName off", in
which case apache uses client-supplied values for the absolute URL.

--
Joshua Slive

Apache HTTP Server Users Mailing List: http://httpd.apache.org/userslist.html

 
 
 

1. Apache : LISTEN directive and SERVER_PORT environment Variable, HELP

I had a CGI using the SERVER_PORT environment variable to
select a configuration.

I'd like to have apache listening on many ports, so i must
use the LISTEN directive on each port. But this directive
force the SERVER_PORT to 80 when the CGI is called.

I tried to use a RewriteRule to set SERVER_PORT to the
correct value :

RewriteRule xxx xxx [E=SERVER_PORT:1234]

but this variable is set after the RewriteRule
is applied.

Has somebody an other idea ???

thanks.

----------------------------------------------------
Bruno Pennec EDF - DER

2. How can I increase my coredumpsize?

3. Apache Listen directive

4. IMAP daemon supports mail notification ?

5. Listen Directives

6. C++ Compiler

7. Unable to have multiple Listen directives with Apache 2.0.16

8. Single out one field from an expression

9. Apache listen directive make server load high.

10. Trouble with Listen directive and Apache 1.1.1

11. Apache and Listen Directive not working

12. Newbie question about "Listen" and "Bind address"

13. Disable/undo directives in deeper config scopes, here: Action directive