Quantcast
Channel: OKWAVE 最新質問([技術者向] コンピューター/205)【本日】
Viewing all articles
Browse latest Browse all 38062

nginx バーチャルホスト 403エラーについて

$
0
0
nginxでバーチャルホストを設定したところ、バーチャルホスト自体は問題なく動くのですが、公開ディレクトリ(documentRoot)をroot以外のユーザーにすると、httpアクセスが403になってしまいます。パーミッションをどの値にしても403がでます。rootで運用する分には問題ないのですが、このままでは各ユーザーにsshなどを提供することができません。 ユーザー毎の設定方法をご存知の方がいらっしゃいましたら、よろしくお願いします。 設定は以下のようにしました。 【 nginx.spec 】 ・ 略 ・ ./configure \  --user=nginx\  --group=nginx \ ・ 略 ・ 【 nginx.conf 】 user nginx; ・ 略 ・ http{  server{   listen 80;   server_name hoge.com;   access_log /var/log/nginx/hoge.com/access.log;   error_log /var/log/nginx/hoge.com/error.log;   root /home/hoge/hoge.com;   index index.html;  } } ・ドキュメントルートである/home/hoge/hoge.comにはindex.htmlがあります。 ・ユーザー[hoge]は、nginxグループ(プライマリ)に所属しています。 ・/home/hoge以下の権限は、hoge.nginxです。 ・パーミッションは、644や777などいろいろ試しましたが403が出ます。 ・/home/hoge以下の権限をroot.rootにすると問題なくindex.htmlを表示できる。

Viewing all articles
Browse latest Browse all 38062

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>