Online Book Reader

Home Category

Running Linux, 5th Edition - Matthias Kalle Dalheimer [448]

By Root 1216 0
the user and group that the server normally runs at.

User nobody

Group nogroup

MaxInstances 30

# Global creates a "global" configuration that is shared by the

# main server and all virtualhosts.

# Umask 022 is a good standard umask

# to prevent new dirs and files

# from being group and world writable.

Umask 022

### Virtual server running on our internal interface

ServerName "Acme Internal FTP"

MaxClients 10

DeferWelcome on

DenyAll

User ftp

Group ftp

AnonRequirePassword off

# We want clients to be able to login

# with "anonymous" as well as "ftp"

UserAlias anonymous ftp

AllowAll

# Limit WRITE everywhere in the anonymous chroot

DenyAll

### Another virtual host on port 4000

ServerName "Acme Internal FTP upload"

Port 4000

MaxClients 10

MaxLoginAttempts 1

DeferWelcome on

DenyAll

User ftp

Group ftp

AnonRequirePassword off

# We want clients to be able to login with

# "anonymous" as well as "ftp"

UserAlias anonymous ftp

AllowAll

# We only allow upload

AllowAll

DenyAll

The example is a pretty standard main server that allows Unix users access to the filesystem. The interesting parts are the two sections. The first one is an anonymous-only server listening to the localhost (127.0.0.1) interface (not particularly useful, I admit), and the second one is an anonymous-only, write-only server listening to port 4000 on the 192.168.1.5 interface.

Part IV. Network Services

In this part of the book, we introduce you to the things that really make Linux powerful and popular: such tools as a web server, email delivery tools, a database, and some of the other features on the cutting edge of system use. We also show you ways to protect your system and hedge against potential disasters.

Chapter 25: Running Web Applications with MySQL and PHP

Chapter 26: Running a Secure System

Chapter 27: Backup and Recovery

Chapter 28: Heterogeneous Networking and Running Windows Programs

Chapter 25. Running Web Applications with MySQL and PHP

Just writing a couple of lines of HTML code is not enough for most web sites; dynamic content is what people want today. To tell the truth, most commercial web sites offer more dynamic content than visitors really want—Flash-driven animations that greet you instead of useful information, for instance, or interactive JavaScript menus that make information harder to retrieve instead of easier—but in this chapter we give you an introduction to offering basic dynamic content that's really useful.

Linux is—you guessed it—an excellent platform for serving dynamic content. A bazillion web sites serving dynamic content are already running on Linux today; this is one of the foremost application areas where Linux excels.

Dynamic content can be achieved by two entirely different ways of programming: server-side programming and client-side programming. JavaScript, Java applets, and the Microsoft-specific ActiveX platform are the most common ways of producing interactive HTML pages with client-side programming.

Because of limitations in these technologies, however, most sites with substantial information to deliver use server-side programs. You can use them in many different flavors with many different software packages, but one combination has become ubiquitous for implementing these techniques. This combination is so common nowadays that it even has received a phony acronym: LAMP, which is short for Linux-Apache-MySQL-PHP. We have already talked about the Apache web server, and this whole book is about Linux, so what we have left to talk about here are the latter two packages—MySQL and PHP—as well as how the four packages go together.

Return Main Page Previous Page Next Page

®Online Book Reader