nginxを使用して、すでに動いているサーバーについて質問です。
nginxが以下のように設定されているのですが、
ドメインAAA: /var/www/AAA/wordpress
サブドメインbb.AAA: /var/www/html/bb
サブドメインcc.AAA: /var/www/html/cc
上記すべてのファイルの所有者、グループともにapacheになっています。
ちなみに、/var/lib/php/session/もapacheでした。
質問としては、以下の2つです。
1.どうして所有者グループがapacheなのにnginxで動くのか
2.もしサブドメインcake.AAAを/var/www/html/cakeというディレクトにして、cakephpを動かそうとした場合、ファイル、セッションの所有者、グループは誰にすべきなのか
以上です。
どなたかお詳しい方、よろしくお願いいたします。
nginx
1//nginx.conf 2 3server { 4 listen 80; 5 server_name AAA.jp.net; 6 include /etc/nginx/default.d/*.conf; 7 return 301 https://www.$server_name; 8} 9 10server { 11 listen 80; 12 server_name www.bb.AAA.jp.net; 13 location / { 14 root /var/www/html/bb; 15 index index.html; 16 } 17} 18server { 19 listen 80; 20 server_name www.cc.AAA.jp.net; 21 location / { 22 root /var/www/html/cc; 23 index index.html; 24 } 25} 26server { 27 listen 80; 28 server_name www.AAA.jp.net; 29 30 include /etc/nginx/default.d/*.conf; 31 return 301 https://$server_name$request_uri; 32 33 error_page 404 /404.html; 34 location = /404.html { 35 root /usr/share/nginx/html; 36 } 37 38 error_page 500 502 503 504 /50x.html; 39 location = /50x.html { 40 root /usr/share/nginx/html; 41 } 42 43 access_log /var/log/nginx/access_80.log main; 44 45 location = /favicon.ico { 46 log_not_found off; 47 } 48 49 location /wp-admin { 50 proxy_pass http://localhost:8080; 51 } 52 53 location /wp-login.php { 54 proxy_pass http://localhost:8080; 55 } 56 57 location /wp-login.php { 58 proxy_pass http://localhost:8080; 59 } 60 61 location = /wp-admin { 62 rewrite ^(.+)$ /wp-admin/index.php; 63 } 64 65 set $do_not_cache 0; 66 if ($http_cookie ~ ^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$) { 67 set $do_not_cache 1; 68 } 69 70 if ($request_method != "GET") { 71 set $do_not_cache 1; 72 } 73 deny ***.***.***.***; 74 75 location / { 76 proxy_no_cache $do_not_cache; 77 proxy_cache_bypass $do_not_cache; 78 proxy_redirect off; 79 proxy_cache zone1; 80 proxy_cache_key $scheme://$host$request_uri; 81 proxy_cache_valid 200 1d; 82 proxy_pass http://localhost:8080; 83 proxy_store_access user:rw group:rw all:rw; 84 85 } 86}
回答1件
あなたの回答
tips
プレビュー