インストール
$ cd /tmp $ curl -sS https://getcomposer.org/installer | php $ mv composer.phar /usr/local/bin/composer.phar $ alias composer='/usr/local/bin/composer.phar' $ composer --version $ composer self-update && composer create-project --prefer-dist cakephp/app my_cakephp_app_name $ cd /tmp/my_cakephp_app_name $ mv /tmp/my_cakephp_app_name /var/www/my_cakephp_app_name
nginxの設定ファイル
$ vi /etc/nginx/conf.d/my_cakephp_app_name.conf server { listen 80; server_name 192.168.33.10; root /var/www/my_cakephp_app_name; index index.php; #access_log /var/log/nginx/my_cakephp_app_name-access.log; #error_log /var/log/nginx/my_cakephp_app_name-error.log; location / { try_files $uri $uri/ /index.php?$args; } location ~ \.php$ { try_files $uri =404; include /etc/nginx/fastcgi_params; #fastcgi_pass 127.0.0.1:9000; fastcgi_pass unix:/var/run/php-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } # 無いとcss等が表示されない location ~ ^/(img|css|js|files)/(.+)$ { root /var/www/cakephp/webroot; try_files /$1/$2 =404; } }
参考
多謝