• ベストアンサー
※ ChatGPTを利用し、要約された質問です(原文:「www.あり」へリダイレクト)

ダッシュボード画面でログインできないエラーが発生する場合の対処方法

paseri1の回答

  • paseri1
  • ベストアンサー率92% (26/28)
回答No.6

再インストールを試されても、意図通りにならなかったと言う事は、いよいよ謎ですね。 もしかすると私の契約しているサーバとは、構成が違っているのかもしれません。 私の契約しているサーバの構成では以下のような配置になっています。 /home/初期ユーザ名/www/ /home/初期ユーザ名/log/access_log_日付 /home/初期ユーザ名/log/error_log_日付 以下、コントロールパネルの確認事項 サーバコントロールパネル⇒ドメイン設定⇒ドメイン/SSL設定 ドメイン一覧内のドメイン名で当該ドメイン名の副項目の、 アクション:マルチドメイン パス:/任意のディレクトリ名 変更⇒ドメイン詳細設定⇒(1)マルチドメインとして使用する(推奨)にチェック (2)マルチドメインの対象のフォルダ:/home/初期ユーザ名/www/任意のディレクトリ名 注:任意のディレクトリ名は、揃えておくこと。 ここまで、再度確認してみて間違っていないか調べてください。 次にクイックインストールの時は次のようにされていましたでしょうか? 運用に便利なツール⇒クイックインストール⇒カテゴリメニュー⇒ブログ⇒WordPress⇒インストール先:ドメイン名/任意のディレクトリ名⇒インストール 注:任意のディレクトリ名は、揃えておくこと。 ログの場所ですが、最初に書いたサーバの構成で書いたディレクトリ内に一日単位で格納されています。 また、サーバコントロールパネルからは、以下の通りの場所から確認できます。 アプリケーションの設定⇒アクセスログの設定⇒エラーログの表示⇒エラーログ WordPress がログインできる状況で次の箇所も確認してみてください。 admin 権限でログインしてから、 設定⇒一般⇒WordPressアドレス(URL):https://www.ドメイン名/任意のディレクトリ名 サイトアドレス(URL):https://www.ドメイン名/任意のディレクトリ名 注:任意のディレクトリ名は、揃えておくこと。 設定⇒SAKURA RS SSL⇒「共有SSLを利用している、もしくはSSL証明書をレンタルサーバコントロールパネルから設定した」にチェック 「実際にSSLを利用してサイトと管理画面へアクセスできる。」にチェック 上記の手順で、以前から書いている .htaccess ファイルと組み合わせることなく、www.ドメイン名/任意のディレクトリ名 で WordPress が問題なく認証が通りました。 これでも意図通りに出来ない場合は、運用方法を変更するか別のサーバをレンタルするかになるかと思います。 ご確認ください。

mute_low
質問者

お礼

続きです。 文字数制限で書ききれなかったです。 [Fri Aug 24 16:09:12.372287 2018] [autoindex:error] [pid 20323] [client 66.249.79.246:0] AH01276: Cannot serve directory /home/初期ユーザ名/www/naka/: No matching DirectoryIndex (index.html,index.htm,index.shtml,index.shtm,index.cgi,index.php,index.hdml) found, and server-generated directory index forbidden by Options directive [Fri Aug 24 16:51:44.964597 2018] [autoindex:error] [pid 20323] [client 52.53.201.78:0] AH01276: Cannot serve directory /home/初期ユーザ名/www/naka/: No matching DirectoryIndex (index.html,index.htm,index.shtml,index.shtm,index.cgi,index.php,index.hdml) found, and server-generated directory index forbidden by Options directive ※初期ユーザー名は変えています。 http://www.masatsu.com/hakata/h-soap.htm というのは、心当たりありません。 ーーーーー 一般設定とSAKURA RS SSLの設定をしました。 SSL化されて、「www.あり」でサイトに繋がりますが、 「www.なし」でも繋がっています。(リダイレクトされていない) 「www.あり」だけでサイトを作るため、 「www.なし」があると、重複コンテンツになります。 試しに.htaccessに、 RewriteEngine on RewriteCond %{HTTP_HOST} !^www\. RewriteRule (.*) http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L] RewriteCond %{ENV:HTTPS} !on RewriteCond %{HTTP_HOST} !^www\. RewriteRule (.*) https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L] を入れると、変わらずログインできなくなります。 <IfModule mod_deflate.c> SetOutputFilter DEFLATE AddOutputFilterByType DEFLATE text/css application/x-javascript application/javascript application/ecmascript </IfModule> <IfModule mod_expires.c> ExpiresActive On <FilesMatch "\.(css|js)$"> ExpiresDefault "access plus 1 week" </FilesMatch> <FilesMatch "\.(gif|jpe?g|png)$"> ExpiresDefault "access plus 1 month" </FilesMatch> </IfModule> <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{ENV:HTTPS} !on RewriteCond %{HTTP_HOST} !^www\. RewriteRule (.*) http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L] RewriteCond %{ENV:HTTPS} on RewriteCond %{HTTP_HOST} !^www\. RewriteRule (.*) https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L] RewriteBase /naka/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /naka/index.php [L] </IfModule> に変えても、ログインできず。 SSL化は出来るのですが、 「www.なし」にアクセスすると、 「www.あり」に繋がるようにする。 これが、出来ないですね。 プラグインなどの干渉でしょうか?

mute_low
質問者

補足

paseri1さん、返信ありがとうございます! とても詳しく書いていただき、本当に本当に感謝です。 ありがとうございます! ーーーーー コントロールパネルの確認事項は、問題ありませんでした。 ただ、クイックインストール⇒インストール済み一覧を見てみると、 /home/初期ユーザ名/www/任意のディレクトリ名/任意のディレクトリ名 となっていました。 FTPで確認すると、フォルダが2回被っています。 一度、WordPressをアンインストールしてから再インストールしましたが、 また、/任意のディレクトリ名/任意のディレクトリ名となります。 これが原因かと思いましたが、どうでしょうか? ーーーーー エラーログを見てみました。 [Fri Aug 24 00:41:30.877692 2018] [autoindex:error] [pid 27231] [client 50.125.101.36:0] AH01276: Cannot serve directory /home/初期ユーザ名/www/naka/: No matching DirectoryIndex (index.html,index.htm,index.shtml,index.shtm,index.cgi,index.php,index.hdml) found, and server-generated directory index forbidden by Options directive [Fri Aug 24 00:41:31.146674 2018] [autoindex:error] [pid 20324] [client 50.125.101.36:0] AH01276: Cannot serve directory /home/初期ユーザ名/www/naka/: No matching DirectoryIndex (index.html,index.htm,index.shtml,index.shtm,index.cgi,index.php,index.hdml) found, and server-generated directory index forbidden by Options directive, referer: http://www.nakasubb.com/ [Fri Aug 24 04:49:52.726496 2018] [autoindex:error] [pid 22868] [client 188.166.174.28:0] AH01276: Cannot serve directory /home/初期ユーザ名/www/naka/: No matching DirectoryIndex (index.html,index.htm,index.shtml,index.shtm,index.cgi,index.php,index.hdml) found, and server-generated directory index forbidden by Options directive [Fri Aug 24 05:58:13.098147 2018] [autoindex:error] [pid 20323] [client 163.43.102.56:0] AH01276: Cannot serve directory /home/初期ユーザ名/www/: No matching DirectoryIndex (index.html,index.htm,index.shtml,index.shtm,index.cgi,index.php,index.hdml) found, and server-generated directory index forbidden by Options directive [Fri Aug 24 05:58:13.180492 2018] [autoindex:error] [pid 20325] [client 163.43.102.56:0] AH01276: Cannot serve directory /home/初期ユーザ名/www/naka/: No matching DirectoryIndex (index.html,index.htm,index.shtml,index.shtm,index.cgi,index.php,index.hdml) found, and server-generated directory index forbidden by Options directive [Fri Aug 24 07:33:55.317763 2018] [autoindex:error] [pid 20325] [client 178.154.200.66:0] AH01276: Cannot serve directory /home/初期ユーザ名/www/naka/: No matching DirectoryIndex (index.html,index.htm,index.shtml,index.shtm,index.cgi,index.php,index.hdml) found, and server-generated directory index forbidden by Options directive [Fri Aug 24 08:41:29.998460 2018] [autoindex:error] [pid 20323] [client 109.102.111.66:0] AH01276: Cannot serve directory /home/初期ユーザ名/www/naka/: No matching DirectoryIndex (index.html,index.htm,index.shtml,index.shtm,index.cgi,index.php,index.hdml) found, and server-generated directory index forbidden by Options directive [Fri Aug 24 10:47:50.834672 2018] [autoindex:error] [pid 20325] [client 66.102.6.116:0] AH01276: Cannot serve directory /home/初期ユーザ名/www/naka/: No matching DirectoryIndex (index.html,index.htm,index.shtml,index.shtm,index.cgi,index.php,index.hdml) found, and server-generated directory index forbidden by Options directive [Fri Aug 24 10:47:50.985106 2018] [autoindex:error] [pid 20615] [client 66.102.6.70:0] AH01276: Cannot serve directory /home/初期ユーザ名/www/naka/: No matching DirectoryIndex (index.html,index.htm,index.shtml,index.shtm,index.cgi,index.php,index.hdml) found, and server-generated directory index forbidden by Options directive [Fri Aug 24 12:34:15.569570 2018] [autoindex:error] [pid 20390] [client 49.106.213.120:0] AH01276: Cannot serve directory /home/初期ユーザ名/www/naka/: No matching DirectoryIndex (index.html,index.htm,index.shtml,index.shtm,index.cgi,index.php,index.hdml) found, and server-generated directory index forbidden by Options directive, referer: http://www.masatsu.com/hakata/h-soap.htm [Fri Aug 24 14:13:03.531628 2018] [autoindex:error] [pid 27229] [client 162.210.196.97:0] AH01276: Cannot serve directory /home/初期ユーザ名/www/naka/: No matching DirectoryIndex (index.html,index.htm,index.shtml,index.shtm,index.cgi,index.php,index.hdml) found, and server-generated directory index forbidden by Options directive

関連するQ&A

  • httpからhttpsへのリダイレクト方法

    すいません、よくわかりませんので教えて下さい。.htaccessに記述してhttpにアクセス来たものをhttpsへリダイレクトしたいです。 今の状況は下記です。 AddHandler application/x-httpd-php53 .php RewriteEngine On # Main RewriteRule for multidomain. RewriteCond %{HTTP_HOST} ^(sanetsu.com) RewriteCond %{REQUEST_URI} !^/(sanetsu.com)/ RewriteRule ^(.*)$ http://www.sanetsu.com/$1 [L] # Main RewriteRule for multidomain. RewriteCond %{HTTP_HOST} ^(www.burikama.com) RewriteCond %{REQUEST_URI} !^/(www.burikama.com)/ RewriteRule ^(.*)$ /%{HTTP_HOST}/$1/ [L] # Main RewriteRule for multidomain. RewriteCond %{HTTP_HOST} ^(burikama.com) RewriteCond %{REQUEST_URI} !^/(burikama.com)/ RewriteRule ^(.*)$ http://www.burikama.com/$1 [L] # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress すいません、上記の記述をどのように変更したらhttpsへリダイレクトさせることができますでしょうか?前任のweb担当の方と連絡が付かないので教えていただけたらありがたいです。 宜しくお願い致します。

    • ベストアンサー
    • HTML
  • wwwありかつhttpsへリダイレクトさせたい

    .htaccessに以下の記述をしていますが、 ブラウザでURLに”xxxx.jp”と"http://xxxx.jp"と入力してアクセスすると、 https://xxxx.jpにリダイレクトされてしまます。 ドメインxxxx.jpを.htaccessに記載せずにhttps://www.xxxx.jpにリダイレクトさせる記述をご存知でしょうか? wwwありの場合"www.xxxx.jp"、"http://www.xxxx.jp"は意図したとおり”https://www.xxxx.jp"に転送されています。 --- RewriteEngine On RewriteCond %{HTTPS} off RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] ---

    • 締切済み
    • CGI
  • .htaccessでリダイレクトしたいです@さくら

    .htaccessでwwwなしのサイトにリダイレクトをかけたいのですが、うまくいきません。 色んな方法がサイトにありそれを試しているのですが、 一瞬テストでうまくいったと思ったのですが、それ以降うまくいかなくなってしまいました。 使用しているプロバイダはさくらインターネットです。 今までに試したコマンドは下記です。 --------------------------- <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{HTTP_HOST} ^(www.hoge\.com)(:80)? RewriteRule ^(.*) http://hoge.com/$1 [R=301,L] </IfModule> --------------------------- RewriteEngine on RewriteCond %{HTTP_HOST} www¥.hoge¥.com RewriteRule .* http://hoge.com%{REQUEST_URI} [R=301,L] --------------------------- .htaccess を設置しているディレクトリは /home/hoge/www になります。 ぜひ教えていただけないでしょうか。よろしくお願いいたします。 また、.htaccessは変更してどのくらいで反映されるのか、補足的に教えていただけると助かります。 以上、よろしくお願いいたします。

  • htaccessの書き方

    RewriteEngine On RewriteCond %{HTTP_HOST} ^dog.abcd.com$ RewriteCond %{REQUEST_URI} !^/dog/ RewriteRule (.*) /dog/$1 RewriteCond %{HTTP_HOST} ^cat.abcd.com$ RewriteCond %{REQUEST_URI} !^/cat/ RewriteRule (.*) /cat/$1 サブドメインを追加するには上記の記述をhtaccessに記入すればよいとサーバー会社の説明にありましたので、その通りにしました。 ところが、htaccessに設定していないサブドメインにアクセスすると、通常のドメインの内容が表示されてしまいます。 登録ドメインがabcd.comだとして、設定していないサブドメインがtest.abcd.comだとすると、test.abcd.comにアクセスするとabcd.comの内容がそのまま表示されてしまいます。 存在しないサブドメインにアクセスすると全てメインドメインの内容が表示されてしまうのは、検索エンジン対策としても思わしくないように思えます。 出来れば、存在しないサブドメインへのアクセスは404エラーになるようにしたいのですが、方法がわかりません。 htaccessで使われる言語の知識がなくチンプンカンプンなので 適当に以下のような感じでいろいろ試行錯誤していますが、なかなか思うようにいきません。 RewriteEngine On RewriteCond %{HTTP_HOST} ^dog.abcd.com$ RewriteCond %{REQUEST_URI} !^/dog/ RewriteRule (.*) /dog/$1 RewriteCond %{HTTP_HOST} ^abcd.com$ RewriteCond %{REQUEST_URI} !^/ RewriteRule (.*) /$1 RewriteCond %{HTTP_HOST} (ここでabcd.comまたはdog.abcd.com以外のリクエストは)$ RewriteCond %{REQUEST_URI} !^/404/ RewriteRule (.*) /404/$1 を表示させる、としたいのですが、このような命令文はありますでしょうか? どなたかアドバイスいただければ大変助かります。

    • ベストアンサー
    • HTML
  • SSLのリダイレクトについて

    sslのリダイレクトの作業を急いでやらないといけないのですが、sslに関しては全くの初心者なので調べながらいろいろやってみましたがどうしてもうまくいかず困っています。。 Wordpressでサイトを作成していてドメイン直下の.htaccessにリダイレクトの記述をしています。 サーバーはGMOのiCLUSTAで、sslはジオトラストです。 http://○○○.jp/ にアクセスした場合に、 https://ssl.○○○.jp/ へリダイレクトされるようにしたいです。 .htaccessの記述内容です # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress RewriteEngine on RewriteCond %{HTTPS} on RewriteRule ^(.*)$ https://ssl.○○○.jp/$1 [R=301,L] この記述をしていますが、リダイレクトされたりされなかったりの不安定な状態です。 されないことの方が多いのでどの条件で動いているのかがわかりません。 RewriteCond %{HTTPS} on を、 RewriteCond %{HTTPS} off にするとリダイレクトされますが、処理がループされていますという表示が出てしまいます。 どのような記述をすればうまくいくのでしょうか?

  • htaccess wwwがあるのとないので同じページを表示させることはできますか?

    現在●●.comと■■.comの2つのアドレスを使用していて、 ■■.comをマルチドメインにするため下記をhtaccessに記載しています。 www. ■■.comを追加子ドメインにして ■■.comと同じページを見られるようにするにはどうすればよいでしょうか? # Enable RewriteEngine. RewriteEngine On # Main RewriteRule for multidomain. RewriteCond %{HTTP_HOST} (■■.com) RewriteCond %{REQUEST_URI} !^/(■■.com)/ RewriteRule ^(.*)$ /%{HTTP_HOST}/$1/ [L]

    • ベストアンサー
    • HTML
  • ハッスルサーバーでの301リダイレクト設定について

    ハッスルサーバーにてサイトを運営している者です。 http://www.abc.com/ と http://abc.com/ どちらのページも閲覧できてしまう為、これを 「www」有りに統一したく、「.htaccess」を使用して 301リダイレクトを試みておりますが、実際に「.htaccess」を アップロードすると、www有り無し両方とも500サーバーエラーと なってしまいます。 記述は下記に習いました↓ RewriteEngine on RewriteCond %{HTTP_HOST} ^hogehoge¥.com ←注意:左記のエンマークは半角にして下さい。 RewriteRule (.*) http://www.hogehoge.com/$1 [R=301,L] ご教授くださいませ。よろしくお願いします。

  • HTTPSへの強制リダイレクトについて

    質問です。さくらレンタルサーバで.htaccessで RewriteEngine On RewriteCond %{SERVER_PORT} !^443$ RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R] or RewriteCond %{HTTPS} on RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [R,L] にしてもリダイレクトループが起きてしまい、強制的にhttpsにする事が出来ません。 例としてドメインを abc.jp として http://abc.jp/ (wwwはなし)で接続した時に httpsに移すという物ですが、さくらレンタルサーバでは、なぜかループしてしまいます。 どうすれば強制化出来るでしょうか。また.htaccess以外にも方法がありましたら お教え下さい。

  • 301リダイレクトの設定について

    「○○○.jp」と「www.○○○.jp」を統一し、どちらのURLからの アクセスでも「○○○.jp」ディレクトリ内のコンテンツが 表示されるように設定したいと考えております。 契約しておりますレンタルサーバ会社では.htaccessファイルの 編集内容についてはサポートしておらず、ネット上で設定方法を 検索して試みておりますが、アクセスすると403のエラーが表示され 上手くいっておりません。 以下に.htaccessの設定内容をとエラーの状況を記載いたします。 Webサーバの運用については知識が皆無の為、非常に難儀しております。 不備があればご指摘いただき、またその他の設定等での不具合の 可能性があれば、それもご教示いただけませんでしょうか。 宜しくお願い申し上げます。 ---------------------------------------------------------------- # Enable RewriteEngine. RewriteEngine On # Main RewriteRule for multidomain. RewriteCond %{HTTP_HOST} ^(◆◆◆.jp|▲▲▲.com|■■■.com|◇◇◇.com|○○○.jp|www.○○○.jp) RewriteCond %{REQUEST_URI} !^/(◆◆◆.jp|▲▲▲.com|■■■.com|◇◇◇.com|○○○.jp|www.○○○.jp)/ RewriteRule ^(.*)$ /%{HTTP_HOST}/$1/ [L] Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} ^www.○○○\.jp RewriteRule ^(.*)$ http://○○○.jp/$1 [R=301,L] ----------------------------------------------------------------

  • 301リダイレクト さくらサイトプランサブドメイン→他社独自ドメインへ

    さくらレンタルサーバーのライトプランを使っています。サブドメインを、他社の独自ドメインに「301リダイレクト」したいのですが、 上手くいきません。さくらライトプランのサブドメインじゃないドメインなら、うまく301リダイレクトができるのですが? どなたかやさしく教えてください…。 「.htaccess」内の記述は以下になります。さくらサイトプランのサブメインからだと、うまくいかないんですよ~>_< Options +FollowSymLinks RewriteEngine on RewriteRule (.*) http:/転送先ドメイン/$1 [R=301,L]

    • ベストアンサー
    • HTML