Apache

These are some random notes on using Apache. They have not yet been organized into a howto.

ports and ips

BindAddress, Port, Listen! Which one to use? In general, it is only necessary to bind to a specific IP when using vservers or multiple apache instances.

See httpd.apache.org/docs/1.3/bind.html

  • BindAddress:
    BindAddress 12.34.56.78
    which addresses to bind to. only should be used once! Use of BindAddress is deprecated in favor of Listen.
  • Port:
    Port 80
    Which ports to bind to. Used in conjuction with BindAddress. Totally ignored if Listen specifies a port.
  • Listen:
    Listen 12.34.56.78:80
    Listen 12.34.56.78:443
    Listen *:8080
    Used instead of BindAddress and Port. more flexible, and you can specify more than one IP and port combination.
  • NameVirtualHost:
    Required when using a single ip for multiple domains.

logging

ErrorLog "| logger -t apache -p daemon.err"
CustomLog "| logger -t apache -p daemon.info" combined
LogFormat "%v \"%r\" %>s %b \"%{Referer}i\"" combined

domain, request, status code, bytes sent, referrer

other

Proxy
Using mod_proxy
Securing
Ways to make apache more secure.
SSL
mod_ssl with apache 1.3
Spambots
a quick and easy (manual) way to identify and stop spambots.