Red Hat DIRECTORY SERVER 2.0 - GATEWAY Instrukcja Użytkownika Strona 20

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 96
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 19
Chapter 3. Getting started
We will start by detailing an absolutely minimal configuration file that gets the server
launched but nothing else.
Listen 80
Figure 3-4. httpd.conf: The Listen command
The command to tell the server to listen for connections is Listen. This takes one
argument, specifying which interface and port to listen on. The default port assigned
to web services by the Internet authorities is port 80. Quoting just a port number
means to listen on that port number on every IP-enabled interface. Simply to launch
the web server this is all we need!
# /etc/init.d/httpd start
Starting httpd: [ OK ]
Figure 3-5. Launching the web server with a minimal configuration
Unfortunately, the launched web server then immediately shuts down. By default,
the web server will log error messages in /var/log/httpd/error_log. We can look
in there for clues as to what we need next.
[Mon Mar 17 17:51:13 2003] [notice] Apache/2.0.40 (Red Hat Linux)
configured -- resuming normal operations
[Mon Mar 17 17:51:13 2003] [alert] (2)No such file or directory:
getpwuid: couldn’t determine user name from uid 4294967295, you
probably need to modify the User directive
...
[Mon Mar 17 17:51:14 2003] [alert] Child 9315 returned a Fatal error...
Apache is exiting!
Figure 3-6. error_log: Launch and fail
What does this error message mean? It means that the web server needs to know
who to run as. You will recall that the software installation created a user and group
for the server to run as. We need to tell it to use them. This is done with the User and
Group commands in the configuration file.
User apache
Group apache
Figure 3-7. httpd.conf: User and group
We have cheated. There is one configuration line we have omitted because in the Red
Hat Linux build of Apache there is an appropriate, compiled-in default. A number
of files will be referred to in this configuration file (such as the modules we will start
to meet in Chapter 4 and the log files we will meet in Chapter 7) and we want to
give relative path names for these files. We need to specify one absolute path for
these to be relative to. We add the ServerRoot command to identify this directory for
completeness.
The second “unnecessary” line we will add has the effect of turning off various set-
tings which default to being on. We do this for two reasons. The first is didactic; we
want to meet these options explicitly when they become relevant rather than relying
on defaults. The second is our decision to provide what was specified and no more.
This line will turn off everything and we must explicitly turn on what we want.
16
Przeglądanie stron 19
1 2 ... 15 16 17 18 19 20 21 22 23 24 25 ... 95 96

Komentarze do niniejszej Instrukcji

Brak uwag