Hey guys, Just wanted some help regh apache. I run mac os x mountain lion and have been using apache for at least a week now. But, out of no where, when i tried to acces my index page on 127.0.0.1, i get this error : "Oops! Google Chrome could not connect to 127.0.0.1". I've looked into my httpd.conf file and everything seems to be fine... I'm not able to figure out the problem. Hope you guys can help. Thanks in advance!
Try to change the Apache port (80) in your Apache configuration file and see if this will fix the problem.
Hi RoseHosting.. i tried changing all of that.. but nothing seems to be working... is there a way to reset the apache install? other than just replacing the original httpd.conf file... i've tried that as well.. Side note : I've got vhost running on my system but "hostname.com" (which referes to my virtual host name) doesn't work.. the output i get shows a webpage with "Index of /" in <h1> tags and 2 directories "redmine/" and "robots.txt". Hoping to get a solution to at least one of my problems. Thanks !!
"out of nowhere"? There is always something. I don't use OS X, so I'm not sure what the configuration setup is like (if it's anything like Linux, it varies between distributions). However, you might find that some parts of the configuration in httpd.conf are being overridden. The documentation with it should detail what other files are used (although it should be obvious when looking in the directory - or they could be in a subdirectory). What did you change prior to this fault occurring? (Was this when you added the vhost?) Have you checked if Apache is listening? On Linux I would use netstat, but - unsurprisingly - this (apparently) doesn't work for OS X. However, there is a solution here. Have you also been monitoring Apache's log file as the service is started _and_ when you try to connect to 127.0.0.1 on port 80?
Are you sure Apache is actually running, also consider a firewall issue. One thing to check is a netstat -n|grep 80 and then you'll see if it's running and if it's listening on port 80.
checklist, Apache running, Firewall rules on the web server, behind a router ? - forwarding ports, If this is on local pc - anti-virus and firewall rules. This is a pretty common checklist if you still have issues after checking all the above then we can go further into it.