I've gotten "Web sharing" back easily enough via https://discussions.apple.com/docs/DOC-3083 and other articles. But it only shares on my own system with localhost. How can I get it back to where it will serve my Sites publicly to other machines?
1 Answer
First, a couple of questions.
I'm assuming you are doing this at home. At the moment if you point your web browser at http://localhost
on the machine running Apache you get a page that says It Works!
When you say
it only shares on my own system with localhost
then a machine on the same network when pointed at http://192.168.1.9/
(or whatever your IP address is) does not see the same page.
What does it see?
As a first step, in System Preferences
go to Security & Privacy
and check that the firewall is off.
Second step is to check the Apache logs at /var/log/apache2
To make sure that you have the correct log files look and see if a good page access from your machine is in access_log
and then see if anything gets logged into error_log
when you try from another machine.
Next, we need to look for a Listen
command in the Apache config file. In /etc/apache2/original/httpd.conf
there should be a line Listen 80
Finally, check for another Listen
command that might override that. At the command line go to /etc/apache2
and then grep "Listen" */*
will list all lines in any of the config files that might do that.
If a machine on the same net sees the right page and you want the web server seen by the outside world then that's a question of configuring your router properly.
-
"What does it see?" In FF I get "The connection has timed out. The server at <the dns name of my machine> is taking too long to respond." Firewall is off– jlarsonJan 17, 2014 at 22:45
-
I've added some more ideas of places to look for information. I suspect that there is a "Listen" line that is restricted to '127.0.0.1' somewhere. Jan 18, 2014 at 7:52