
Apache Configuration Files
|
127
For security reasons, the default installation of MySQL that we’ve performed restricts
the MySQL server to local clients such as PHP web scripts or the command-line mysql
client. Otherwise, people could connect to your database through the Internet, which
would be a cruel thing for an innocent database. You can check that the MySQL
server’s address is 127.0.0.1 (the local or loopback address) using this command:
# netstat -tlnp
Proto Recv-Q Send-Q Local Address Foreign Address StatePID/Program name
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN25948/mysqld
Apache Configuration Files
Apache uses plain ASCII configuration files. Their locations vary across Linux distri-
butions; Table 6-1 shows where Debian puts them.
If
AllowOverride is enabled for any directory, on every client request Apache must
check every directory from the document root down for any .htaccess files, and read
them. This slows down Apache. More importantly, it spreads some of Apache’s config-
uration across the filesystem, making it hard to know what options are in effect for a
directory at any time. If you don’t need .htaccess files, don’t use them. They’re dis-
abled by default.
Table 6-1. Apache configuration files
File/Directory under /etc/apache2 Uses
apache2.conf Main configuration file. Includes other files through the following directives:
# Include module configuration:
Include /etc/apache2/mods-enabled/*.load ...