Skip to Main Content
Linux System Administration
book

Linux System Administration

by Tom Adelstein, Bill Lubanovic
March 2007
Intermediate to advanced content levelIntermediate to advanced
304 pages
11h 12m
English
O'Reilly Media, Inc.
Content preview from Linux System Administration
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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering Linux System Administration

Mastering Linux System Administration

Christine Bresnahan, Richard Blum
Mastering Linux Administration

Mastering Linux Administration

Alexandru Calcatinge, Julian Balog

Publisher Resources

ISBN: 9780596009526Supplemental ContentCatalog PageErrata