mac yosemite(10.10). apache, php 설정
* Apache Version 확인
$ apachectl -v
Server version: Apache/2.4.16 (Unix)
* PHP Version 확인
$ php -v
PHP 5.5.29 (cli) (built: Sep 6 2015 20:20:34)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
LoadModule rewrite_module libexec/apache2/mod_rewrite.so
// ssl 을 사용하려면 아래의 내용도 주석제거해야 함
LoadModule ssl_module libexec/apache2/mod_ssl.so
Include /private/etc/apache2/extra/httpd-ssl.conf
sudo vi /private/etc/apache2/extra/httpd-ssl.conf 파일에 아래 내용 추가
* sudo vi /private/etc/apache2/httpd.conf 파일에서 아래 내용 수정
DocumentRoot "/Users/xxx/도큐먼트루트dir"
<Directory "/Users/xxx/도큐먼트루트dir">
Options FollowSymLinks Multiviews
MultiviewsMatch Any
AllowOverride None
Require all granted
</Directory>
* 설정파일 검사
$ sudo apachectl configtest
$ sudo apachectl stop
$ sudo apachectl start
$ sudo apachectl restart
* php 실행시 timezone 설정하라는 경고가 나오면
(Warning: phpinfo(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier...)
/private/etc/php.ini.default 파일을 php.ini 로 복사한후
php.ini 파일에서 아래의 내용 수정한다.
date.timezone = Asia/Seoul