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...
views:
20answers:
2
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
2010-10-24 15:20:45
I tried sudo apachectl start but the behaviour is the same.
Alessandra
2010-10-24 16:13:54
did the command give any output? and if you ps aux from the command line, you can't see the process?
Orbit
2010-10-24 16:15:46
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
2010-10-24 17:18:59
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
2010-10-24 17:22:20
How can I check that I am set up with localhost?
Alessandra
2010-10-24 17:26:20
make sure your servername is localhost in httpd.conf, and Listen is set to 80.
Orbit
2010-10-24 17:28:22
ServerName localhost:80 then sudo apachectl restart ... but it doesn't work sigh! Listen 80
Alessandra
2010-10-24 17:31:37
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
2010-10-25 02:41:18