Hello Cupidswedding,
You most likely have a permissions problem as you noted. Checking
briefly on my system I get
-rw-r--r-- 1 root wheel 37309 Jan 16 02:16 /etc/httpd/httpd.conf
as output from
ls -l /etc/httpd/httpd.conf
If you are not familiar with the format for the output of ls, you read
this as...
user has read/write access, the group and others have read access
the user is "root", the group is "wheel"
the file size is 37309 bytes long, created on January 16th.
So, you must act as the user named root to modify this file.
There are at least two different ways to solve this problem:
- login as root. Note I do *not* recommend doing this because you are
able to damage your system inadvertently. I have been managing Unix
systems for over 20 years and I still limit the time I log in as root.
- use either "su" or "sudo" to modify the file (acting as the user
root). This is what I recommend and is what I describe below. You can
copy / paste the command lines if that would help.
Step 1 - edit the httpd.conf file and save it in your home directory
Step 2 - run the terminal application
If you don't know where this is, the default location for it is
MacHD:Applications:Utilities:Terminal
To help recognize its icon, it looks like a black screen with a large
">" sign at the upper left.
You will get a white window with something like
Last login: Thu Feb 20 20:43:44 on ttyp1
Welcome to Darwin!
[Mark-Johnsons-Computer:~] maniac%
which indicates that I last logged in on February 20 and the prompt
indicates the name of my computer, current directory, and user name.
The percent sign also indicates I am running as a "normal user" and
not as root.
Step 3 - save the existing httpd.conf file
sudo mv /etc/httpd/httpd.conf /etc/httpd/httpd.conf.orig
you will be prompted for the password of the root user. This will
rename the current copy of the file (in case you have problems). Do
this once - don't repeat after you have replaced the original file.
Step 4 - replace the file with your copy
sudo cp ~/httpd.conf /etc/httpd/httpd.conf
This will copy your version (you did save it in your home directory)
to the directory used by the web server. Replace the first file name
(~/httpd.conf) with the real file name if you gave it a different name
or put it into a different location. The second sudo will not ask for
a password as long as you do it shortly after the first command.
Step 5 - restart the server
I assume you already know how to stop & start the server. If not, I
can suggest a few methods but would need to know how you have
activated the server.
At this point, your changes should be active. If it does not work -
try restoring the original file
sudo cp /etc/httpd/httpd.conf.orig /etc/httpd/httpd.conf
and make sure that works - then make your changes in a step by step
basis. Use steps 4 and 5 as needed to effect the changes.
Good luck.
--Maniac |