LoginSignup
8
8

More than 5 years have passed since last update.

【raspberry pi】nginxにdokuwikiを導入

Last updated at Posted at 2014-02-21

参考

環境

php5-cgiパッケージをインストール

$ sudo aptitude install -y php5-cgi
$ /usr/bin/php-cgi -v
PHP 5.4.4-14+deb7u7 (cgi-fcgi) (built: Dec 13 2013 02:09:22)

起動スクリプト

$ sudo update-rc.d php-fastcgi default
$ sudo sysv-rc-conf --list | grep php
php-fastcgi  0:off      1:off   2:on    3:on    4:on    5:on    6:off

nginx設定

/opt/nginx/conf/nginx.conf
server {

    # 省略...

    location ~ \.php$ {
        fastcgi_pass 127.0.0.1:9000;
        include fastcgi_params;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param PATH_INFO $uri;
    }

    location ~ ^/dokuwiki/(data|conf|bin|inc)/ {
        deny all;
    }

    location ~ ^/dikuwiki/lib/^((?!php).)*$ {
        root html/dokuwiki/lib;
        expires 30d;
    }
}
8
8
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
8
8