nginxをフロントに設置しapacheでwordpressを動かしています。
example.com/wp-login.phpでログインした後、example.com/wp-adminにリダイレクトされますが
このページは動作していません
example.com でリダイレクトが繰り返し行われました。
というエラーが出て管理画面が見えません。
しかしexample.com/wp-admin/index.phpにアクセスするとダッシュボードは問題なく表示されます。
原因はどこにありますでしょうか??
nginxのconfファイル
nginx
1server { 2listen 80; 3#ドメインを指定 4server_name example.com; 5return 301 https://$host$request_uri; 6 7proxy_set_header Host $http_host; 8proxy_set_header X-Forwarded-Proto $scheme; 9 10location / { 11proxy_pass http://127.0.0.1:8080; 12} 13} 14server { 15listen 443; 16server_name example.com; 17access_log off; 18 19ssl on; 20ssl_certificate /etc/letsencrypt/live/example.com/cert.pem; 21ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; 22ssl_session_timeout 5m; 23ssl_protocols SSLv2 SSLv3 TLSv1; 24ssl_ciphers HIGH:!aNULL:!MD5; 25ssl_prefer_server_ciphers on; 26 27location / { 28proxy_redirect off; 29proxy_set_header HTTPS on; 30proxy_set_header Host $host; 31proxy_set_header X-Real-IP $remote_addr; 32proxy_set_header X-Forwarded-Proto https; 33proxy_set_header X-Forwarded-Host $host; 34proxy_set_header X-Forwarded-Server $host; 35proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 36proxy_pass http://127.0.0.1:8080/; 37} 38}