Reputation: 111
I am trying to connect to localhost and I am getting the following error on the browsers (chrome and ff and safari)
Browsers connection attempt to localhost was rejected.
i tried
telnet 127.0.0.1
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
telnet: Unable to connect to remote host
and
Barry$ / : curl localhost
curl: (7) Failed to connect to localhost port 80: Connection refused
the httpd.conf
is set to LISTEN : 80
However I can connect using thin on localhost:3000
for a rails project
I've looked at other similar Q's and answers but cannot find a fix.
Upvotes: 2
Views: 2571
Reputation: 111
I just wanted to post my solution to getting localhost working again.
I used the following process to reinstall apache and update the ports. It worked for me so I hope it can help someone else.
I do mention at the bottom that im still getting an unfound url error, so if anyone can help, that would be great.
RE-BUILDING APACHE
port search apache2 Warning: port definitions are more than two weeks old, consider using selfupdate
sudo port uninstall apache2
sudo port -v selfupdate
Ensure that Xcode command line tools are installed or else you get a warning: Warning: The Xcode Command Line Tools don't appear to be installed; most ports will likely fail to build.
xcode-select —install
sudo port upgrade outdated
sudo port search apache2
then i did a reinstall of apache2 sudo port install apache2
sudo port load apache2
This got Localhost back up and running on port 80 for me however I'm not out of the woods yet. when i go to my dev sites using
localhost/~barrymcmahon/
im getting the following error
Not Found
The requested URL /~barrymcmahon/php_5_advanced/ was not found on this server.
Upvotes: 0
Reputation: 793
Check your Apache config with this command:
sudo apachectl -t
This tests the config files and tells you if there's an error. Running sudo apachectl start does not output config file syntax errors to the logs for some reason.
Do u have skype or pow installed ?
Upvotes: 1