
突然、MacOS Yosemite 上の Apache 2.4 のローカルインストールが動作しなくなりました。問題は権限に関連しているようですが、解決方法が見つかりません。
数時間かけていくつかの投稿を読んだ結果、現在の状況は次のようになりました。
エラー:
[authz_core:debug] [pid 35232] mod_authz_core.c(799): [client 127.0.0.1:55992] AH01626: authorization result of Require valid-user : denied (no authenticated user yet)
[core:crit] (24)Too many open files: [client ::1:53498] AH00529: /Users/username/Sites/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/Users/username/Sites/' is executable
(私はそのような .htaccess ファイルを持っていません)。とにかく、私はどこでも 777 権限を強制しました:
$ chmod -R a+rwx /Users/username
$ ls -l /Users/username
drwxrwxrwx 187 username staff 6358 Dec 13 16:05 Sites
$ ls -l /Users/
drwxrwxrwx+ 174 username staff 5916 Dec 13 16:39 username
httpd.conf 内のディレクティブは次のとおりです。
<Directory "/Users/username/Sites/">
Options +Indexes +FollowSymLinks +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
#Require all granted - tried, doesn't matter
</Directory>
私は取り除くことができます上書きを許可するしかし、.htaccess は本当に必要であり、とにかく、仮想ホスト内の多くの画像やリソースに対して権限の問題が依然として存在します。
誰かの提案に従って、httpd.conf内のapacheユーザーを変更しました
#User _www
#Group _www
User username
Group staff
まだ同じ。
答え1
1 日あたりのヒット数はどれくらいですか? ヒット数が多い場合は、キャッシュ設定を変更してみてください。応答時間を改善するために、ファイルを開いたままにしている可能性があります。ホストしている仮想ドメインの数はいくつですか? vhost のファイル総数は (おおよそ) どれくらいですか? これはパフォーマンス チューニングの問題である可能性があります...