LoginSignup
12
12

More than 5 years have passed since last update.

Wordpressのための最低限のnginx設定

Last updated at Posted at 2013-12-18
  • 前提条件:php-fpmが127.0.0.1:9000で動いているとする

nginxは標準でfastcgi.confという設定ファイルを用意してくれているので,
以下の設定のみでwordpressを設置できる.

server {
  server_name example.jp;
  root /path/to/wordpress;
  index index.php index.html index.htm;

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

  location ~ \.php$ {
    include fastcgi.conf;
    fastcgi_pass 127.0.0.1:9000;
  }
}

try_filesの行は,記事のURLをwordpress/2013/12/article-name/ のようにrewriteするために必要.

12
12
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
12
12