HTML and CSS Reference
In-Depth Information
This command will open the httpd.conf file in the nano text editor with superuser permis-
sions, allowing you to edit and save the file. As a result, nano will take over your terminal
screen, which should now look something like this:
GNU nano 2.0.6 File: httpd.conf
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:> for detailed information.
# In particular, see
# <URL:>
# for a discussion of each configuration directive.
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
# consult the online docs. You have been warned.
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path. If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so "log/foo_log"
# with ServerRoot set to "/usr" will be interpreted by the
# server as "/usr/log/foo_log".
[ Read 500 lines ]
^G Get Help ^O WriteOut ^R Read File ^Y Prev Page ^K Cut Text
^C Cur Pos
^X Exit
^J Justify
^W Where Is ^V Next Page ^U UnCut Text ^T To Spell
Now your primary goal in this file is to set up and enable PHP. To do this you need to scroll
down to the directive that loads the PHP module. By default this should be on line 117.
You can use the Ctrl+Shift+_ keyboard shortcut to invoke the Enter line number,
column number: command in nano and enter 117 to go directly to line 117. Altern-
atively, just scroll down using the down-arrow key until you reach the part of the file that
looks like this:
LoadModule alias_module libexec/apache2/
LoadModule rewrite_module libexec/apache2/
#LoadModule perl_module libexec/apache2/
#LoadModule php5_module libexec/apache2/
#LoadModule hfs_apple_module libexec/apache2/<IfModule
The line that reads #LoadModule php5_module libexec/apache2/libph- is the line you're interested in. Once you're there, place the cursor in front of the #
at the beginning of the line and delete it (with the Delete key). That's it. Now hit Ctrl+X to
exit. Upon exiting you'll be asked if you want to save the buffer (geek speak for “save the
Search WWH ::

Custom Search