HTML and CSS Reference
In-Depth Information
So, if there are many roadblocks to editing the httpd.conf file, how do you go about it? It's
not too difficult from the Terminal app using sudo along with a command-line text editor.
Note
The sudo (switch user and do) command is available to any user on Mac OS X with Ad-
min rights. Most users have Admin rights to their Mac. But if a business, school, parent, or
untrusting spouse provided your computer for you, you may not have Admin rights. If this
is the case, you can't continue on your own; rather you should bug the person who provided
you your computer incessantly until they either give you Admin rights to your system or
set all of this up for you.
To begin, though, we'll test out sudo and create a backup copy of httpd.conf just in case,
all at the same time with the following:
$ sudo cp httpd.conf httpd.conf.orig
Password:
After typing this command you'll be prompted to enter your system password to complete
the command. Also, if this is the first time you've used sudo , you'll be given a warning
about the dangers of using sudo inappropriately. Upon successfully typing in your pass-
word, you can run the ls command, and you should see a new httpd.conf.orig file listed.
If not, something went wrong (check the previous note about being Admin).
Assuming you were able to create a copy of httpd.conf, you should be ready to go, assured
that even if you do something horribly wrong, you can recover using your backup file. So
begin the editing with
$ sudo nano httpd.conf
Now, because you recently ran the sudo command to create your backup, you may not
be prompted again for your password. sudo will remember you for short periods of time
between sudo commands, so you don't need to enter your password every time you run
the command.
Search WWH ::




Custom Search