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

nginx+fuelPHP でaliasを切りwordpress等同居させる

More than 3 years have passed since last update.

はじめに

nginx に fuelPHPとwordpressを同居させる為に準備した時のメモです。
既にnginx+fuelPHPの環境が整っていることを前提にaliasを設定しaliasの先にwordpressをいれればOKかと考えてます。

環境
nginx
php-fpm
fuelPHP 1.7

詳細

  1. aliasの設定

wordpressのインストール先のフォルダを作成します。
/usr/local/src/xxxxx

nginxのコンフィグに作成したフォルダのaliasを切ります。

xxx.conf
    location /column {
        alias /usr/local/src/xxxxx;
        index index.php;
        if (!-e $request_filename) {
            rewrite ^/xxxxx(.+)$ /column/index.php?q=$1 last;
            break;
        }
    }
    location ~ ^/xxxxx/.+\.php$ {
        fastcgi_pass            unix:/var/run/php-fpm/php-fpm.sock;
                fastcgi_index           index.php;
        fastcgi_split_path_info ^/xxxxx(.+\.php)(.*)$;
                include                 fastcgi_params;
        fastcgi_param           SCRIPT_FILENAME /usr/local/src/xxxxx$fastcgi_script_name;
    }
#--- ここからはFuelPHP用 
    location / {
        index               index.php;
        try_files $uri      $uri/ /index.php$is_args$args;
    }

    location ~ \.php$ {
        fastcgi_pass        unix:/var/run/php-fpm/php-fpm.sock;
        fastcgi_index       index.php;
        include             fastcgi_params;
        fastcgi_param       SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }

あとはnginxを再起動します。

/usr/local/src/xxxxxにコンテンツを入れれば動くと思います。

その他

参考
nginx+php-fpmをyumでインストールして、WordPress/CakePHPを動かす設定

Why do not you register as a user and use Qiita more conveniently?
  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
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  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