4
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

AWSでSiteGuard WP Pluginを使いログインページ変更しました

Last updated at Posted at 2019-03-20

AWSのEC2にインストールしたWordPressで、Guard WP Pluginを使いログインページの変更することができませんでした。
下記の手順で、ログインページを変更できました。

サーバーのOSは、こちらです。
Ubuntu 14.04.5 LTS (GNU/Linux 3.13.0-125-generic x86_64)
WordPressは、こちらです。
Bitnami WordPress 4.8.1-0

まず、下記の記事を参考にしました。
AWSでmod_rewriteが効かない場合

この記事で書かれているパスでは、目的のファイルが見つかりませんでした。
いろいろ探して、下記の場所にありました。

/opt/bitnami/apache2/conf/httpd.conf

下記のコマンドを入力してファイルを開き修正しました。

sudo vi /opt/bitnami/apache2/conf/httpd.conf

リスタートしました。

service httpd restart

AWSは、.htaccessが無効と知りました。
https://qiita.com/hnagao/items/b7b35ad01a8ba8a42548

このコマンドで修正しました。

sudo vi /opt/bitnami/apps/wordpress/conf/htaccess.conf

下記のコードを追加しました。

<Directory "/opt/bitnami/apps/wordpress/htdocs/">
RewriteRule ^hoge(.*)$ wp-login.php$1 [L]
</Directory>

hogeの部分が、実際の変更したログインページです。
SiteGuard WP Pluginでログインページを変更すると、メールが届きます。
このメールで、変更したログインページのURLを確認できます。

修正方法は、下記の記事を参考にしました。
http://kzhishu.hatenablog.jp/entry/2015/12/07/090000

ファイルを修正したら、apacheのリスタートを忘れずに行なってください。

sudo /opt/bitnami/ctlscript.sh restart apache

今回の対応にあたり、スタックオーバーフローで教えてくださった皆様に感謝しています。
https://ja.stackoverflow.com/questions/53501/aws%E3%81%AEec2%E3%81%A7mod-rewrite%E3%81%8C%E4%BD%BF%E3%81%88%E3%81%AA%E3%81%84%E3%82%88%E3%81%86%E3%81%A7%E3%81%99/53596#53596

4
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?