Personal Web Sharing on 10.4.8

I have read other topics about this, but couldn't find any that help me.

My problem is this - when I click on Start (for Personal Web Sharing) in the Preferences app, the service never starts. When I open terminal and enter -

cd /etc/httpd/
ls -l httpd.conf

I get -
-rw-r--r-- 1 root wheel 38414 Nov 23 09:27 httpd.conf

When I enter apachectl start, I get this -

fopen: Permission denied
httpd: could not open error log file /private/var/log/httpd/error_log.
/usr/sbin/apachectl start: httpd could not be started

When I look at my account in PREFERENCES : Accounts, I see it as an Admin account.

What the heck is wrong? Any ideas?

--
Murray

G4, Mac OS X (10.4.8)

Posted on Nov 23, 2006 9:29 AM

Reply
10 replies

Nov 29, 2006 9:33 AM in response to MurrayS

Paste this command in Terminal:

sudo apachectl configtest

If it says "Syntax OK" then there is nothing wrong with Apache.

Set the permissions on the error log file with this command:

sudo chmod 664 /private/var/log/httpd/error_log ; sudo chown root:wheel /private/var/log/httpd/error_log

Now try to start Apache:

sudo apachectl start

Open your Console.app and navigate to the server log for more information (/var/log/httpd/).

Nov 29, 2006 2:07 PM in response to MurrayS

The easiest way is to use a text editor that supports UNIX linendings and writing a root owned file.

I just use Terminal, though. The built in "pico" editor is great for UNIX files. Try this command:

sudo pico /private/etc/httpd/httpd.conf

You will see the httpd file, then press ctl-x to quit the editor. If you edited the file ctl-x will not quit because it is asking if you want to save the file. There are some keyboard instructions on the bottom of the pico screen. Plenty of nano/pico instructions on the internet, it is a standard Linux editor. pico is essentially the same as nano editor.

Nov 29, 2006 2:26 PM in response to MurrayS

And, by the way, you're absolutely right about the
two versions of PHP - I upgraded to 5.0x, and that's
when the trouble started!


I made that exact mistake and that's exactly what happened to me too.

The following lines, which are found in the file /etc/httpd/httpd.conf had to be uncommented to make PHP work:

LoadModule php4_module libexec/httpd/libphp4.so
AddModule mod_php4.c

I don't know if recommenting them (putting a #) in front of them) will work for you; when I installed PHP 5 on top of PHP 4 I eventually wound up having to reinstall the OS ( I mean, there's a reason I don't tamper around with it much).

I may some time soon try upgrading, but for now I'll hang with PHP 4; it works.

SJK

Jan 26, 2007 5:06 PM in response to zehnkatzen

I see this in the error log:

Processing config directory: /private/etc/httpd/users/*.conf
Processing config file: /private/etc/httpd/users/faliol.conf
Processing config file: /private/etc/httpd/users/kevinevans.conf
Processing config file: /private/etc/httpd/users/netherscurial.conf
[Fri Jan 26 20:08:00 2007] [error] Cannot resolve host name (null) --- ignoring!
[Fri Jan 26 20:08:00 2007] [crit] (48)Address already in use: make_sock: could not bind to port 80

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Personal Web Sharing on 10.4.8

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.