0
0

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.

WordPressをnginx使ってサブディレクトリで公開する

Last updated at Posted at 2020-08-13

基本は WordPress | NGINX
に書いてある設定をすれば良い。
対象のサブディレクトリのlocationでtry_filesを追加する。

大事なのは、サブディレクトリのtry_filesの書き方で、こうやって書く。
=404 を入れないこと。

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

最後に =404 を入れてしまうと、not foundが出続けます。
この書き方はNGです。

location /wordpress {
        try_files $uri $uri/ /wordpress /index.php?$args =404;
}
0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?