[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [cobalt-users] Editing httpd.conf (bigtime newbie)



>>> Can someone  write a brief tutorial on how to do this? (i.e. "Editing
httpd.conf for
>>> Dummies").

Hi Brian,

We've all learned this for the first time at some time in our lives.  I know
how you feel.

Yes, this file is integral to the operation of your server.  If you make a
typo in there, or accidently delete the wrong thing, it is possible that all
sites on your server could be down.

Use extreme caution at all times.  It is good that you backed up the file.
Get into the habit of always backing up httpd.conf each time you view it or
edit it.  This will save your butt down the road.

I also use vi to edit files in telnet.  It can be alittle tricky.  I suggest
purchasing a book about vi.  O'Reilly has a 'vi Editor Pocket Reference
Book' that can be purchased for about $5 USD.

IMPORTANT:  If you are in httpd.conf, and you want to exit without saving,
type in the following;

<Esc> : q!  <Enter>

Whereas  <Esc> is the escape key, and <Enter> is your enter key on the
keyboard.  That will exit the file without chaning anything.  Thus, if you
make a mistake, you can use this.

To save your changes, type the following;

<Esc> : wq <Enter>

That will save any changes you have made.   Remember to reload apache after
you change httpd.conf so the changes will take effect.

/etc/rc.d/init.d/httpd reload

I do have one tip that will help you along.  If you are looking for the
files of a particular web site, say,  hotbooks.com, you can use the / to
indicate a search.

Example

/hotbooks.com

After typing the above, hit the <enter> key on your key board and vi will
search for all instances of 'hotbooks.com', stopping the first time it finds
hotbooks.com.  httpd.conf is a very long file and this feature will help you
get to the files you need.

Scrolling:  If you use your 'Down' arrow key on your keyboard, you can
scroll down, and your 'up' arrow key will scroll you up.

I hope this helps.

Bill Micke
---