Mantis BTを、nginxとphp-fpmの環境で、サブディレクトリーで動かす

サブディレクトリーで動かす

nginxとphp-fpmでサブディレクトリーで動かす話なのだが、 Mantis BTに限らず、PHPなウェブアプリケーションは何であっても同じような話になるような気がする。 しかし、Mantis BTしか確かめていない。

ここでは、http://example.com/its/ のようなURLで動かす例を示す。


http {
    upstream php-handler {
        server 127.0.0.1:9000;
    }
(snip)
    server{
(snip)
        # Mantis BT
        location ^~ /its {
                alias /usr/pkg/share/mantis;
                index index.php index.html;

                location ~ \.php$ {
                        include fastcgi_params;
                        fastcgi_pass php-handler;
                        fastcgi_index index.php;
                        fastcgi_param SCRIPT_FILENAME $request_filename;
                }
        }
    }
}

Mantis BTは、/usr/pkgsrc/devel/mantisから、1.3.1を導入してある。

0 件のコメント:

コメントを投稿

注: コメントを投稿できるのは、このブログのメンバーだけです。

2023年10月10日まで有効なWindows 11 development environmentで、ファイルシステムとしてReFSが使えるようになっていた

Windows 11 development environmentというのがあって、 各種ハイパーバイザー用に仮想マシンがインポートできるようなファイルが配布されている 。 私はVirtualBox用のものを利用しているが、Hyper-V (V2)の方が良いのかもしれ...