nginx + apache + wordpressが動いている環境で、
新たにcakePHPをapacheで動かしたい場合に、apacheにどのような設定を追加すべきか、
具体的に教えていただくことはできますでしょうか?
実現したいcakePHP側の機能として、ユーザ認証の利用があります。
状況は以下の通りです。
0. すでに稼動中のサーバーで、aaa.jp.netというwordpressが動いています。
0. nginxの設定では、wp-admin/wp-loginはapacheに8080ポートで投げる、という設定になっているようです。
0. apache側はほぼデフォルトの設定で、Listen 8080が入っていました。
nginx
1# 2# The default server 3# 4 5server { 6 listen 80; 7 server_name www.aaa.jp.net; 8 9 include /etc/nginx/default.d/*.conf; 10 return 301 https://$server_name$request_uri; 11 12 error_page 404 /404.html; 13 location = /404.html { 14 root /usr/share/nginx/html; 15 } 16 17 error_page 500 502 503 504 /50x.html; 18 location = /50x.html { 19 root /usr/share/nginx/html; 20 } 21 22 access_log /var/log/nginx/access_80.log main; 23 24 location = /favicon.ico { 25 log_not_found off; 26 } 27 28 location /wp-admin { 29 proxy_pass http://localhost:8080; 30 } 31 32 location /wp-login.php { 33 proxy_pass http://localhost:8080; 34 } 35 36 location /wp-login.php { 37 proxy_pass http://localhost:8080; 38 } 39 40 location = /wp-admin { 41 rewrite ^(.+)$ /wp-admin/index.php; 42 } 43 44 set $do_not_cache 0; 45 if ($http_cookie ~ ^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$) { 46 set $do_not_cache 1; 47 } 48 49 if ($request_method != "GET") { 50 set $do_not_cache 1; 51 } 52 deny ***.***.***.***; 53 54 location / { 55 proxy_no_cache $do_not_cache; 56 proxy_cache_bypass $do_not_cache; 57 proxy_redirect off; 58 proxy_cache zone1; 59 proxy_cache_key $scheme://$host$request_uri; 60 proxy_cache_valid 200 1d; 61 proxy_pass http://localhost:8080; 62 proxy_store_access user:rw group:rw all:rw; 63 64 }
あなたの回答
tips
プレビュー