LoginSignup
3
2

More than 5 years have passed since last update.

SynologyのNASにインストールしたWordpressでパーマリンク設定ができるようにする

Posted at

こんにちは。 Qiita初投稿です。よろしくお願いいたします(-_-)

最近SynologyのNAS(DS116j)を使ってポートフォリオサイトをWordpressで作成しています。パーマリンク設定を変更したところ、リンク先がすべて 404エラーになってしまった.... 修復するまでの備忘録

構成

NAS : DS116j(DSM 6)
Wordpress 4.9.1
Nginxを利用

修復方法

DSMよりSSHが有効になっている前提。NASにSSH経由で接続
Nginxの設定を確認する

$ vim /etc/nginx/app.d/server.webstation-vhost.conf

下の方に以下のような記述があるところがあるのでパスをメモする

include /usr/local/etc/nginx/conf.d/固有の番号/user.conf*;

先程メモしたパス先にuser.conf.wordpress-permalinkファイルを作成し以下を記述(要root)

location /{
try_files $uri $uri/ /index.php?$args;
}

Nginxを再起動する

synoservicecfg --restart nginx

これでパーマリンク設定変えても404エラー出ることなくページ遷移できるようになります

参考

DSM6 : Configure Nginx for Wordpress permalinks (avoid 404)

3
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
3
2