Help us understand the problem. What is going on with this article?

[ Nginx × KUSANAGI ] www 付きドメイン から www なしドメインへのリダイレクト設定

More than 1 year has passed since last update.


  • さくらの VPS
  • KUSANAGI ( CentOS 7 )
  • WordPress
  • KUSANAGI で SSL 化済み


  • /etc/nginx/conf.d 内の example_ssl.conf の下記のように編集する

server {
    listen 443 ssl http2;
    rewrite ^$request_uri?;

server {
    listen       443 ssl http2;
    # 以下省略
  • 編集後、nginx -s reload or kusanagi restart で Nginx を再起動
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away