httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sander Temme <scte...@apache.org>
Subject Re: [users@httpd] Trying to install Apache 2.2.4 on AIX 5.3
Date Wed, 14 Feb 2007 16:40:34 GMT
Sushant,

Great to hear that your server is working. Congratulations!

On Feb 14, 2007, at 3:30 AM, Desai, Sushant wrote:

> Now my other doubt is that, http server is running with a  
> particular IP
> address, but if my machine has various IP addresses, and I want to
> change the default IP address used by Apache server, how would I do  
> it?

Use the Listen directive in the Apache configuration file:

http://httpd.apache.org/docs/2.2/mod/mpm_common.html#listen

You can listen on a specific IP address:

Listen 1.2.3.4:80

Or on all IPv4 addresses:

Listen 0.0.0.0:80

Or on a specific IPv6 address:

Listen [2001:db8::a00:20ff:fea7:ccea]:80

Or on all addresses:

Listen 80

You mentioned that you are running Apache on a cluster. You might  
consider using a specific configuration file on each machine that has  
the correct IP address information for that box, and writing your  
startup script to start Apache with the -d option, like

/oradata/httpd-2.2.4/bin/httpd -d /etc/httpd

Or, if you want to use the same configuration file, you can write a  
simple machine-specific file with JUST the information that is  
different for each machine, and use the Include directive to suck  
that into the configuration. So, in /oradata/httpd-2.2.4/conf/ 
httpd.conf, you would have no Listen directive, but instead:

Include /etc/httpd/conf/listen.conf

(assuming the /etc directory is specific to each cluster member)

Finally, you can use the -c and -C command-line options to httpd from  
your startup script to specify  the listening address:

(on the machine with IP address 1.2.3.4)

/oradata/httpd-2.2.4/bin/httpd -c "Listen 1.2.3.4:80"

It's a wealth of options, really.

S.

-- 
sctemme@apache.org            http://www.temme.net/sander/
PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF



Mime
View raw message