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 > macOS > can't edit Apache 2 httpd.conf file

can't edit Apache 2 httpd.conf file
Thread Tools
scip
Forum Regular
Join Date: Mar 2001
Location: Brookfield, CT, USA
Status: Offline
Reply With Quote
Nov 10, 2003, 10:46 AM
 
I downloaded and installed Complete Apache 2 for OS X from serverlogistics.com. I am trying to edit the httpd.conf file, and I get a "Couldn't Save" error in TextEdit. I'm pretty sure this has to do with file permissions, but I am an admin on the box.

How do I correct this?

Steve
     
gorickey
Posting Junkie
Join Date: Nov 2001
Location: Retired.
Status: Offline
Reply With Quote
Nov 10, 2003, 10:55 AM
 
Is it opening up in "Read-Only" format?

What are the exact permissions on the file?
     
fat mac moron
Grizzled Veteran
Join Date: Sep 2002
Status: Offline
Reply With Quote
Nov 10, 2003, 10:57 AM
 
Launch terminal:

sudo pico /etc/httpd/httpd.conf

Edit your changes and then Control-X to exit. It'll ask you to save changes before it closes pico.
     
scip  (op)
Forum Regular
Join Date: Mar 2001
Location: Brookfield, CT, USA
Status: Offline
Reply With Quote
Nov 10, 2003, 11:00 AM
 
Originally posted by gorickey:
Is it opening up in "Read-Only" format?

What are the exact permissions on the file?
It's not necessarily opening in read-only format...though I can't tell.

Permissions are as follows:

Owner: system
access: r/w

Group: admin
access: r/w

Others: read only


I'm logged in as myself, which is the only user on the system (and hence an administrator on the box).

I wonder if I have to change anything in NetInfo Manager...?
     
scip  (op)
Forum Regular
Join Date: Mar 2001
Location: Brookfield, CT, USA
Status: Offline
Reply With Quote
Nov 10, 2003, 11:02 AM
 
Originally posted by fat mac moron:
Launch terminal:

sudo pico /etc/httpd/httpd.conf

Edit your changes and then Control-X to exit. It'll ask you to save changes before it closes pico.
That'll work for the built-in Apache install.

I'm trying to config Complete Apache 2 (downloaded from serverlogistics.com), where the config file lives at the /Library/Apache2/conf/httpd.conf path.

Steve
     
fat mac moron
Grizzled Veteran
Join Date: Sep 2002
Status: Offline
Reply With Quote
Nov 10, 2003, 11:08 AM
 
Originally posted by scip:
where the config file lives at the /Library/Apache2/conf/httpd.conf path.

Steve
It'll work if you replace "sudo pico /etc/httpd/httpd.conf"

with

sudo pico /Library/Apache2/conf/httpd.conf and make your changes.
     
cambro
Senior User
Join Date: Jan 2002
Location: Laurentia
Status: Offline
Reply With Quote
Nov 10, 2003, 11:10 AM
 
Dude,

BBEdit...open hidden.
     
scip  (op)
Forum Regular
Join Date: Mar 2001
Location: Brookfield, CT, USA
Status: Offline
Reply With Quote
Nov 10, 2003, 11:38 AM
 
Originally posted by fat mac moron:
It'll work if you replace "sudo pico /etc/httpd/httpd.conf"

with

sudo pico /Library/Apache2/conf/httpd.conf and make your changes.
Not that I fear the command line, but I'd like to be able to do this from the GUI. After all, this IS the Mac OS.
     
gorickey
Posting Junkie
Join Date: Nov 2001
Location: Retired.
Status: Offline
Reply With Quote
Nov 10, 2003, 11:39 AM
 
Originally posted by scip:
Not that I fear the command line, but I'd like to be able to do this from the GUI. After all, this IS the Mac OS.
Just change the owner from "system" to yourself...make your changes, and set the owner back to "system"....
     
scip  (op)
Forum Regular
Join Date: Mar 2001
Location: Brookfield, CT, USA
Status: Offline
Reply With Quote
Nov 10, 2003, 11:43 AM
 
Originally posted by gorickey:
Just change the owner from "system" to yourself...make your changes, and set the owner back to "system"....
I already tried that. No workie.
     
gorickey
Posting Junkie
Join Date: Nov 2001
Location: Retired.
Status: Offline
Reply With Quote
Nov 10, 2003, 11:45 AM
 
Originally posted by scip:
I already tried that. No workie.
Hmm, interesting...you have r/w access...
     
scip  (op)
Forum Regular
Join Date: Mar 2001
Location: Brookfield, CT, USA
Status: Offline
Reply With Quote
Nov 10, 2003, 11:47 AM
 
Originally posted by gorickey:
Hmm, interesting...you have r/w access...
Yes.

Owner: Me
Access: r/w

Group: admin
Access: r/w

Others: Read only
     
scip  (op)
Forum Regular
Join Date: Mar 2001
Location: Brookfield, CT, USA
Status: Offline
Reply With Quote
Nov 10, 2003, 01:08 PM
 
Originally posted by scip:
Yes.

Owner: Me
Access: r/w

Group: admin
Access: r/w

Others: Read only
Well, I ended up having to change the permissions on the conf directory as well in order to get it to allow me to save changes.

Now, I can load content from a different directory on the machine running Apache (http://localhost/) but I can't seem to see that same content on a machine across my LAN, by using either the IP address or the domain name I've given the machine.
     
   
 
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
Top
Privacy Policy
All times are GMT -4. The time now is 05:20 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,