어제 요세미티로 업그레이드 했으므로 웹 개발을위한 로컬 구성이 더 이상 작동하지 않습니다.Yosemite로 업그레이드 한 후 Apache 구성이 깨졌습니다.
나는 /Users/user/public_html
에서 userdir을 설정했으며 localhost/~user/websitename
을 통해 모든 웹 사이트에 액세스 할 수있었습니다. 특별한 것은 없지만 구성하는 데 시간이 걸렸습니다.
아파치 디렉토리를 보면 백업을 유지하면서 많은 파일이 교체 된 것을 알았습니다. 다시 설정을 사용하여 파일을 다시 넣으려고했지만 여전히 작동하지 않습니다. 어쩌면 내가 기억하지 못하는 파일이 없어 졌을 수도 있습니다.
# Settings for user home directories
#
# Required module: mod_userdir
#
# UserDir: The name of the directory that is appended onto a user's home
# directory if a ~user request is received. Note that you must also set
# the default access control for these directories, as in the example below.
#
UserDir public_html
#
# Users might not be in /Users/*/Sites, so use user-specific config files.
#
Include /private/etc/apache2/users/*.conf
<IfModule bonjour_module>
RegisterUserSite customized-users
</IfModule>
<Directory "/Users/*/public_html/">
AllowOverride FileInfo AuthConfig Limit Indexes
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
Order allow,deny
Allow from all
</Directory>
그런하여 http.conf에 내가 설정 한 일부 모듈 :
Include /private/etc/apache2/extra/httpd-userdir.conf
LoadModule userdir_module libexec/apache2/mod_userdir.so
이 :
을 DocumentRoot "/ 사용자/사용자
이것은 아파치 - userdir.conf입니다/public_html "
Directory "/Users/user/public_html">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks MultiViews
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride all
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
단순히 localhost
에 액세스하려고하면 "It works!"라는 메시지가 표시됩니다. 내가 localhost/user
에 가면 웹 사이트 중 하나에 액세스하려고하면로드되지 않고 똑같습니다.
파일을 놓쳤습니까? 아파치 로그에서 어떤 오류도 표시하지 않습니다.
요세미티는 Apache를 2.2에서 2.4로 업그레이드합니다. 구성이 변경되었습니다. mod_userdir 모듈을 활성화 했습니까? 또한 "주문"및 "허용"지침을 변경하고자 할 것입니다. http://httpd.apache.org/docs/2.4/upgrading.html –
미래의 독자는 [Mac OS X Yosemite에서 Apache, PHP 및 MySQL 설치]로 시작하려고 할 수 있습니다 (http : //jason.pureconcepts.net/2012/10/install-apache-php-mysql-mac-os-x/) * 올바른 방법 *. –
또한 읽으십시오 [https://discussions.apple.com/thread/6602475#26885389](https://discussions.apple.com/thread/6602475#26885389) – luisnicg