インストール
$ cd /tmp $ wget https://github.com/bcit-ci/CodeIgniter/archive/3.0.6.zip $ unzip 3.0.6.zip $ mv CodeIgniter-3.0.6 ci3 $ sudo mv ci3 /var/www
設定ファイル編集
$ sudo vi /etc/nginx/conf.d/ci3.conf server { root /var/www/ci3; server_name 192.168.33.10; # example.comとか # Basic auth 全体にかける場合 auth_basic "Restricted"; auth_basic_user_file /etc/nginx/.htpasswd; location / { try_files $uri $uri/ /index.php?/$request_uri; } if ($request_uri !~ ^/(index\.php|assets|files|robots\.txt)) { rewrite ^/(.*)$ /index.php/$1 last; } location ~ \.php$ { fastcgi_pass unix:/var/run/php-fpm.sock; fastcgi_index index.php; #fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name; // 直下とか fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_NAME $fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_script_name; include fastcgi_params; } }
$ sudo systemctl restart nginx
参考
http://symfoware.blog68.fc2.com/blog-entry-1591.html
多謝