views:

20

answers:

2

I've installed snow leopard on the old tiger and I tried to run apache2 by clicking system preferences->sharing->web sharing. It seems to run but if I try to access http://localhost or http://127.0.0.1 or http://192.168.1.6/ (my ip on my network) it doesn't work. I don't know where is the log file (no files on /private/var/log/apache2/). I've seen that the port in /etc/httpd.conf is 80. But I cannot see the process on Activity Monitoring panel: there is not any httpd or apache process running...

A: 

This may not be the answer you are looking for, but MAMP seems to run relatively well for me.

You can also try

sudo apachectl start

from the command line.

Orbit
I tried sudo apachectl start but the behaviour is the same.
Alessandra
did the command give any output? and if you ps aux from the command line, you can't see the process?
Orbit
sudo apachectl start give me the result org.apache.httpd: Already loaded, but I cannot see any process named httpd o apache. If I write from the command line ps aux | grep httpd I cannot see the process!!!
Alessandra
may want to try sudo apachectl restart, check your httpd.conf file to make sure you are setup with localhost, and make sure your browser isn't misinterpreting your http://localhost directive. *cough* mamp
Orbit
How can I check that I am set up with localhost?
Alessandra
make sure your servername is localhost in httpd.conf, and Listen is set to 80.
Orbit
ServerName localhost:80 then sudo apachectl restart ... but it doesn't work sigh! Listen 80
Alessandra
A: 

I think you will find a detailed answer to your question at this URL:

http://shapeshed.com/journal/setting_up_local_websites_on_snow_leopard/

The "trick" is this line, ... which stops and then restarts apache,

sudo apachectl restart

This forces apache2 to read any changes you've made to config files.

Also, check to make sure you are using the right config file. Under Mac OS X 10.6.4, my config files seem to be here:

/etc/apache2/httpd.conf

Logs files are found here:

/var/log/apache2/access_log

This should get you up and running, ... but I would also recommend looking into using MAMP, which is a pre-packaged Mac+Apache2+MySQL+PHP5 stack that you can get up and running very quickly.

http://www.mamp.info/
David Jones

related questions