After using apache in a local dev setup it has suddenly stopped working. I have tried pinging a previously used custom domain and I'm not getting anything.
I have checked the syntax its correct according to apache. I have made sure that my custom domain is in my hosts file. All seems ok.
I have tried this sudo bash -x /usr/sbin/apachectl -k start
and still nothing. Error or access logs don't show any errors or warnings.
I have also checked the permissions of the folder I'm trying to accesses and it is drwxrwxrwx
and a random file inside of the folder has -rwxrwxrwx@
and the parent folder is drwxrwxrwx 34 _www staff 1.1K Feb 4 20:06 www
There were no changes to my httpd file, but I checked it anyways. I tried disabling it Include /private/etc/apache2/other/*.conf
(which contains virtual hosts) and Include /private/etc/apache2/extra/httpd-vhosts.conf
and added one of the previously working vhosts at the end of the httpd file.
Not sure how to proceed as there is no error or flags. The only thing that might have changed are the permissions, but it did work after changing it.
edit: should also add that I'm on Mountain Lion.
apachectl status
? Have you tried restarting it from theinit.d
script? (Should be something like/etc/init.d/httpd restart
.) What happens when you do so there? Also, does it indicate that Apache is running when you do aps aux | grep apache
orps aux | grep httpd
?-bash: /etc/init.d/httpd: No such file or directory
.ping localhost:80
gets me a response but the address given byapachectl status
doesn't work.ps aux | grep apache
doesn't return anything, but ps aux | grep httpd says_www 12397 0.0 0.0 2454312 936 ?? S 12:10PM 0:00.00 /usr/sbin/httpd -D FOREGROUND
androot 12397 0.0 0.0 2454312 936 ?? S 12:10PM 0:00.00 /usr/sbin/httpd -D FOREGROUND
telnet localhost 80
?