Estaba tratando de habilitar php, mysql, apache en mi macbook pro con yosemite. Seguí esta guía pero no se ejecuta. ¿Qué hay de malo en configurar un servidor web local en OS X? Por favor, ayuda... Recibo un error que dice que http://localhost/ no está disponible
Abhimanyus-MacBook-Pro:~ abhimanyuaryan$ cat /etc/hosts
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
#::1 localhost
Abhimanyus-MacBook-Pro:~ abhimanyuaryan$ ls -lad /Library/WebServer/Documents /Library/WebServer/Documents/index*
drwxr-xr-x 8 root wheel 272 Feb 18 13:29 /Library/WebServer/Documents
-rw-r--r-- 1 root wheel 49 Feb 18 13:29 /Library/WebServer/Documents/index.html
-rw-r--r-- 1 root wheel 67 Jan 6 14:08 /Library/WebServer/Documents/index.html.en
Abhimanyus-MacBook-Pro:~ abhimanyuaryan$ ps aux| grep http
abhimanyuaryan 26010 0.0 0.0 2432772 664 s000 S+ 10:21PM 0:00.00 grep http
Tuve errores en mi archivo " private/etc/apache2/httpd.conf ". Para solucionarlo, reemplacé el archivo anterior con un archivo nuevo . Para verificar si tiene errores en el archivo httpd.conf, escriba los siguientes comandos en la terminal:
sudo apachectl start
para iniciar el servidor apache
sudo apachectl configtest
para ejecutar la prueba si la sintaxis del archivo es correcta. Si recibe un comando de retorno que dice sintaxis OK. Entonces el archivo httpd.conf está bien.
En mi caso sudo apachectl configtest
salida:
Abhimanyus-MacBook-Pro:apache2 abhimanyuaryan$ sudo apachectl configtest
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using Abhimanyus-MacBook-Pro.local. Set the 'ServerName' directive globally to suppress this message
Syntax OK
De lo contrario, reemplace el archivo anterior con un archivo nuevo que proporcioné anteriormente.
sudo mv ~/Downloads/httpd.conf /private/etc/apache2/httpd.conf
es decir, sudo mv [objetivo] [destino]. Puede cambiar la ubicación de destino de su archivo. Si el nuevo archivo no se ha descargado en la carpeta de descargas del directorio de inicio (~).
Una vez que haya terminado, siga las instrucciones escritas aquí por etresoft.
. Gracias.
sin ladera