Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Cannot save Apache httpd.conf?!

Cannot save Apache httpd.conf?!
Thread Tools
Mac Elite
Join Date: Jul 2002
Location: On this side of there
Status: Offline
Reply With Quote
Apr 18, 2003, 09:09 PM
 
I've been going to the O'Reilly articles on Apache on OSX: http://www.macdevcenter.com/pub/a/ma...t2.html?page=1

I took out a few #"s from the config file. When I try to save and overwrite the existing httpd.conf, it says "Couldn't save document as /etc/httpd/httpd.conf."

I verified permissions. The directory won't even let me save any file into it.

Anyone have any idea?


wolfen
Do you want forgiveness or respect?
     
Grizzled Veteran
Join Date: Jun 2001
Location: Melbourne, Australia
Status: Offline
Reply With Quote
Apr 18, 2003, 10:36 PM
 
Are you making these updates as a regular old user, or as a super-user?

The two easiest ways I know of doing this are:

1) Get a copy of BBEdit full edition, and use the authentication feature to unlock root files. It's one of the easiest and most convenient ways to update your httpd.conf files (and a lot of other system-level files)

2) Learn the terminal and do it for free.

sudo su
(Type in your administrator password)
pico /etc/httpd.conf

(Make your changes and navigate around using either the cursor keys, or CTRL-Y for page up / CTRL-V for page down)

Ctrl-O to save your changes
Ctrl-X to exit the program

Voila!
Computer thez nohhh...
     
Grizzled Veteran
Join Date: Nov 2001
Location: Oregon
Status: Offline
Reply With Quote
Apr 19, 2003, 12:44 PM
 
Really, it is best not to edit http.conf directly under MacOS X, so you can side-step this issue altogether. Notice the last line of Apple's http.conf file:

   Include /private/etc/httpd/users

That's intended to load http.conf customizations for individual users on your Mac. What it does, effectively, is append every file in the directory /private/etc/httpd/users/, in alphabetical order, to your /etc/httpd/httpd.conf file. So if you place a file containing only the customizations you would otherwise make to /etc/httpd/httpd.conf in the directory /private/etc/httpd/users/, your customizations will always be in effect without ever editing your /etc/httpd/httpd.conf file. Slick, eh? This also saves you from having to re-edit this file if Apple should change it during a system update (folks here on this list have been complaining about this recently, and it is so easily avoided!)

Important safety tip: Every file in /private/etc/httpd/users/ is appended to your /etc/httpd/httpd.conf file, even files with suffixes like ".bak", so keep your backup files in another directory, else they are likely to override the changes you're making in your primary file (e.g. my.httpd.conf.bak would load after my.httpd.conf, which might undo the edits you've made and send you off chasing your tail for hours while trying to figure out why the changes you're making don't seem to work properly -- of course i was never caught by this snare! ).
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 03:25 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2