처음으로 새 MBP 2016을 받았습니다. PHP, MySQL & Apache를 설치하려고합니다. MacBook의 서버의 정규화 된 도메인 이름을 정확하게 확인할 수 없음
sudo apachectl restart
그런 다음 설치 PHP
brew install php71 --with-httpd24
에 의해 명령
을 사용하여 아파치를 시작 또한 변경 ... 또한#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
DirectoryIndex index.html index.php
SetHandler application/x-httpd-php
ServerName dev-server
는, 호스트 파일에서 같은 업데이트 된 다음 한 /etc/hosts/
하지만, 명령을 사용하여 내 아파치를 중지/재시작하려고 할 때마다 sudo apachectl restart
또는 sudo apachectl stop
다음 오류가 발생합니다. 작동이 잘되는 내 브라우저 http://localhost/index.php
에서 모든 PHP 파일을 실행하고있어 이상하게 때
AH00557: httpd: apr_sockaddr_info_get() failed for Sureshs-MacBook-Pro.local
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
httpd not running, trying to start
하지만. 내 index.php 파일에서 코드 <?php phpinfo(); ?>
을 사용하고 있습니다. PHP 버전 PHP Version 7.1.4
이로드 중입니다.
어디에서 잘못 될지 알 수는 있지만 실마리가 없습니다.
--- UPDATE ---
내 /private/etc/hosts
파일에 127.0.0.1 Sureshs-MacBook-Pro.local
을 업데이트 한 후, 하나의 오류는 해결했다. 이제 오류 아래 하나만 나타납니다.
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using Sureshs-MacBook-Pro.local. Set the 'ServerName' directive globally to suppress this message
아파치 설정에'serverName = my.server.name' 지시어를 추가하면 경고 메시지가 해결 될 수 있습니다. – Thakkie
이미'''''ServerName dev-server'''로 추가했습니다. 내 게시물보기 – mi6crazyheart
하이픈없이 ServerName 값을 입력하고 포트 값을 지정하십시오. 예 : ServerName devserver : 80 –