お知らせ

  • 利用規約を守って投稿してください。また、よくある質問および投稿の手引きも参照してください。
  • メッセージの投稿にはアカウントが必要です。未登録の方は、ユーザ登録ページからアカウントを作成することができます。

#1 2015-12-07 17:23:39

ZETSUSHUN
新しいメンバ
登録日: 2015-02-26

Permission755で403エラーが出る。

サーバー初心者です。
apache2(2.4.7)のドキュメントルートを/home/(user)/web/ にしました。

パーミッションも755 にし、これで大丈夫なはずなのですが、いざアクセスしてみると 403 Forbiddenが 出てしまいます。
何故でしょうか?
 

オフライン

 

#2 2015-12-08 18:06:17

favicon.ico
メンバ
登録日: 2010-09-06

Re: Permission755で403エラーが出る。

エラーログに何か出力されていませんか?

$ grep error /var/log/apache2/error.log

オフライン

 

#3 2015-12-08 19:58:58

ZETSUSHUN
新しいメンバ
登録日: 2015-02-26

Re: Permission755で403エラーが出る。

ありがとうございます。 エラーログには このような記述がありました。

コード:

user@SERVER:~$ grep error /var/log/apache2/error.log
[Sun Dec 06 13:07:30.293267 2015] [:error] [pid 5233] [client 66.249.80.42:45246] script '/var/www/html/index.php' not found or unable to stat
[Sun Dec 06 13:07:30.689773 2015] [:error] [pid 5230] [client 66.249.80.33:52520] script '/var/www/html/index.php' not found or unable to stat
[Sun Dec 06 14:08:48.594140 2015] [core:error] [pid 1388] [client 50.92.158.237:59055] AH00135: Invalid method in request Ko\xa2\xfe\x87\xaf\xed\x8f\xa2\x7f\xa9?\xcf\x16S{\xb0eq\x16\x10\xa9@\xe1\x1d@
[Mon Dec 07 04:48:28.320141 2015] [core:error] [pid 1390] [client 116.15.168.12:43375] AH00135: Invalid method in request \xea\x8c-\xa0
[Mon Dec 07 16:08:34.975193 2015] [authz_core:error] [pid 26918] [client 126.17.50.225:50571] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 16:10:59.903228 2015] [authz_core:error] [pid 26922] [client 126.17.50.225:50579] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 16:11:00.685001 2015] [authz_core:error] [pid 26922] [client 126.17.50.225:50579] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 16:11:01.591584 2015] [authz_core:error] [pid 26922] [client 126.17.50.225:50579] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 16:11:02.082214 2015] [authz_core:error] [pid 26922] [client 126.17.50.225:50579] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 16:11:02.832998 2015] [authz_core:error] [pid 26922] [client 126.17.50.225:50579] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 16:11:03.273414 2015] [authz_core:error] [pid 26922] [client 126.17.50.225:50579] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 16:11:04.050327 2015] [authz_core:error] [pid 26922] [client 126.17.50.225:50579] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 16:11:04.631372 2015] [authz_core:error] [pid 26922] [client 126.17.50.225:50579] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 16:11:05.231745 2015] [authz_core:error] [pid 26922] [client 126.17.50.225:50579] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 16:11:05.768598 2015] [authz_core:error] [pid 26922] [client 126.17.50.225:50579] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 16:11:05.804240 2015] [authz_core:error] [pid 26930] [client 126.17.50.225:50580] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 16:11:05.843273 2015] [authz_core:error] [pid 26918] [client 126.17.50.225:50581] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 16:11:05.912949 2015] [authz_core:error] [pid 26920] [client 126.17.50.225:50608] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 16:11:05.963843 2015] [authz_core:error] [pid 26919] [client 126.17.50.225:50609] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 16:11:06.009286 2015] [authz_core:error] [pid 26921] [client 126.17.50.225:50610] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 16:11:06.110827 2015] [authz_core:error] [pid 26922] [client 126.17.50.225:50611] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 16:11:06.150610 2015] [authz_core:error] [pid 26930] [client 126.17.50.225:50612] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 16:11:06.267614 2015] [authz_core:error] [pid 26918] [client 126.17.50.225:50613] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 16:11:59.627614 2015] [authz_core:error] [pid 26921] [client 126.17.50.225:50616] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 16:12:03.169974 2015] [authz_core:error] [pid 26921] [client 126.17.50.225:50616] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 16:12:03.795461 2015] [authz_core:error] [pid 26921] [client 126.17.50.225:50616] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 16:12:04.413564 2015] [authz_core:error] [pid 26921] [client 126.17.50.225:50616] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 16:12:05.005499 2015] [authz_core:error] [pid 26921] [client 126.17.50.225:50616] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 16:12:05.655337 2015] [authz_core:error] [pid 26921] [client 126.17.50.225:50616] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 16:12:06.300001 2015] [authz_core:error] [pid 26921] [client 126.17.50.225:50616] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 16:12:33.563160 2015] [authz_core:error] [pid 26922] [client 126.17.50.225:50618] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 16:12:34.996239 2015] [authz_core:error] [pid 26922] [client 126.17.50.225:50618] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 16:21:21.189433 2015] [authz_core:error] [pid 27377] [client 126.17.50.225:50810] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 16:23:48.996938 2015] [authz_core:error] [pid 27378] [client 126.17.50.225:50826] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 16:23:50.662776 2015] [authz_core:error] [pid 27378] [client 126.17.50.225:50826] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 16:34:42.039097 2015] [authz_core:error] [pid 27480] [client 126.17.50.225:51040] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 16:37:43.229671 2015] [authz_core:error] [pid 27482] [client 126.17.50.225:51123] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 16:37:43.991746 2015] [authz_core:error] [pid 27482] [client 126.17.50.225:51123] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 16:39:59.467728 2015] [authz_core:error] [pid 27484] [client 126.17.50.225:51184] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 16:40:25.235036 2015] [authz_core:error] [pid 27490] [client 126.17.50.225:51185] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 16:41:27.428547 2015] [authz_core:error] [pid 27480] [client 126.17.50.225:51191] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 16:42:02.077002 2015] [authz_core:error] [pid 27481] [client 126.17.50.225:51192] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 16:42:14.736220 2015] [authz_core:error] [pid 27482] [client 126.17.50.225:51193] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 16:42:15.555764 2015] [authz_core:error] [pid 27482] [client 126.17.50.225:51193] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 16:44:59.369443 2015] [authz_core:error] [pid 27483] [client 126.17.50.225:51288] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 16:49:31.470566 2015] [authz_core:error] [pid 27484] [client 126.17.50.225:63708] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 16:59:30.142797 2015] [authz_core:error] [pid 27490] [client 126.17.50.225:63982] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 17:00:37.786155 2015] [authz_core:error] [pid 27480] [client 126.17.50.225:64122] AH01630: client denied by server configuration: /home/user/web/home
[Mon Dec 07 17:00:43.990803 2015] [authz_core:error] [pid 27481] [client 126.17.50.225:64123] AH01630: client denied by server configuration: /home/user/web/home
[Mon Dec 07 17:04:27.122595 2015] [authz_core:error] [pid 27482] [client 126.17.50.225:64200] AH01630: client denied by server configuration: /home/user/web/home
[Mon Dec 07 17:04:34.389828 2015] [authz_core:error] [pid 27483] [client 126.17.50.225:64202] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 17:05:29.378238 2015] [authz_core:error] [pid 27484] [client 126.17.50.225:64204] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 17:20:28.601969 2015] [authz_core:error] [pid 27490] [client 126.17.50.225:64441] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 19:53:06.026221 2015] [authz_core:error] [pid 27480] [client 118.98.104.21:40824] AH01630: client denied by server configuration: /home/user/web/user
[Mon Dec 07 20:00:09.174977 2015] [authz_core:error] [pid 27481] [client 123.151.42.61:33290] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 20:57:19.403274 2015] [authz_core:error] [pid 27482] [client 120.1.56.162:1956] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 21:24:33.235885 2015] [authz_core:error] [pid 27484] [client 112.204.32.12:49889] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 22:25:36.015737 2015] [authz_core:error] [pid 27480] [client 101.62.231.130:57420] AH01630: client denied by server configuration: /home/user/web/
[Mon Dec 07 23:00:17.919030 2015] [authz_core:error] [pid 27481] [client 66.249.80.42:60553] AH01630: client denied by server configuration: /home/user/web/index.php
[Mon Dec 07 23:00:18.310651 2015] [authz_core:error] [pid 27482] [client 66.249.80.24:57220] AH01630: client denied by server configuration: /home/user/web/favicon.ico
[Mon Dec 07 23:02:09.760007 2015] [authz_core:error] [pid 27483] [client 192.168.2.1:58517] AH01630: client denied by server configuration: /home/user/web/index.php
[Mon Dec 07 23:02:10.912855 2015] [authz_core:error] [pid 27483] [client 192.168.2.1:58517] AH01630: client denied by server configuration: /home/user/web/favicon.ico, referer: http://mc-sea.xyz/index.php/login
[Tue Dec 08 00:07:33.055658 2015] [authz_core:error] [pid 29093] [client 144.76.29.162:33174] AH01630: client denied by server configuration: /home/user/web/robots.txt
[Tue Dec 08 00:08:06.154938 2015] [authz_core:error] [pid 27481] [client 141.212.122.129:21366] AH01630: client denied by server configuration: /home/user/web/
[Tue Dec 08 02:40:30.428049 2015] [authz_core:error] [pid 27482] [client 142.4.214.124:51349] AH01630: client denied by server configuration: /home/user/web/robots.txt
[Tue Dec 08 10:25:59.483655 2015] [authz_core:error] [pid 27484] [client 195.62.53.168:32750] AH01630: client denied by server configuration: /home/user/web/css
[Tue Dec 08 11:45:43.832892 2015] [authz_core:error] [pid 27490] [client 82.118.237.111:57727] AH01630: client denied by server configuration: /home/user/web/
[Tue Dec 08 14:02:49.242898 2015] [authz_core:error] [pid 27480] [client 128.232.110.29:57161] AH01630: client denied by server configuration: /home/user/web/
[Tue Dec 08 16:29:07.222541 2015] [authz_core:error] [pid 29093] [client 61.231.5.76:3498] AH01630: client denied by server configuration: /home/user/web/
[Tue Dec 08 17:25:07.460240 2015] [authz_core:error] [pid 27482] [client 111.248.100.50:4699] AH01630: client denied by server configuration: /home/user/web/
[Tue Dec 08 19:02:11.419798 2015] [authz_core:error] [pid 27484] [client 185.106.94.91:42090] AH01630: client denied by server configuration: /home/user/web/phpmyadmin

オフライン

 

#4 2015-12-08 22:53:54

favicon.ico
メンバ
登録日: 2010-09-06

Re: Permission755で403エラーが出る。

エラーログに #1 の「何故でしょうか?」の答えが書いてありますね

[authz_core:error] AH01630: client denied by server configuration: /home/user/web/

旧 DocumentRoot の /var/www/html が上記のエラーにならないための設定は /etc/apache2/apache2.conf にありますので調べてみてください

オフライン

 

#5 2015-12-10 17:23:54

ZETSUSHUN
新しいメンバ
登録日: 2015-02-26

Re: Permission755で403エラーが出る。

いろいろと4日間考えたのですが、いまいちよくわかりませんでした。
具体的にどうすればよいのでしょうか...

オフライン

 

#6 2015-12-11 01:12:10

favicon.ico
メンバ
登録日: 2010-09-06

Re: Permission755で403エラーが出る。

サーバー初心者です。
apache2(2.4.7)のドキュメントルートを/home/(user)/web/ にしました。

上の変更をする為に DocumentRoot /home/(user)/web を書かれたと思いますがその下につぎのように追加してみてください

DocumentRoot /home/(user)/web
<Directory /home/(user)/web/>
    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted
</Directory>

すでに <Directory /home/(user)/web> が在るのであれば上のように Require ディレクティブが在るか確認してください

オフライン

 

#7 2015-12-12 05:44:59

ZETSUSHUN
新しいメンバ
登録日: 2015-02-26

Re: Permission755で403エラーが出る。

先日の返信ありがとうございました。
あの後いろいろあったのですが、無事403error から抜け出せました。

お付き合いいただいた favicon.ico 様 ありがとうございました。

オフライン

 

Board footer

Powered by FluxBB