- php5.6(php-fpm) for Laravel
- nginx
sudo apt-get update && sudo apt-get install python-software-properties
sudo service apache2 stop
sudo apt-get install nginx
sudo add-apt-repository ppa:ondrej/php5-5.6
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install php5 php5-fpm php5-mcrypt php5-mysql git
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
vi /etc/nginx/sites-available/default
server {
listen 80;
server_name $APP_URL$;
root /home/ubuntu/$APP_DIR$/public;
server_tokens off;
index index.html index.htm index.php;
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
access_log off;
error_log /var/log/nginx/codexen.dev-error.log error;
error_page 404 /index.php;
sendfile off;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
}