sudo apt-get install -y sysv-rc-conf
sudo add-apt-repository -y ppa:nginx/stable
sudo apt-get update
sudo apt-get install -y nginx
sudo apt-get update
sudo apt-get install -y php5-fpm php5-mysql
sudo apt-get install -y software-properties-common
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 \
0xcbcb082a1bb943db
sudo add-apt-repository \
'deb http://ftp.yz.yamagata-u.ac.jp/pub/dbms/mariadb/repo/10.0/ubuntu trusty main'
sudo apt-get update
sudo apt-get install -y mariadb-server
sudo mysql_secure_installation
wget -O - http://dl.hhvm.com/conf/hhvm.gpg.key | sudo apt-key add -
echo deb http://dl.hhvm.com/ubuntu trusty main | sudo tee /etc/apt/sources.list.d/hhvm.list
sudo apt-get update
sudo wget https://raw.githubusercontent.com/hhvm/packaging/master/hhvm/deb/skeleton/etc/init.d/hhvm /etc/init.d/hhvm && chmod +x /etc/init.d/hhvm
sudo apt-get install -y hhvm
sudo /usr/share/hhvm/install_fastcgi.sh
sudo update-rc.d hhvm defaults
sudo /usr/bin/update-alternatives --install /usr/bin/php php /usr/bin/hhvm 60
sudo hhvm --mode daemon -vServer.Type=fastcgi -vServer.Port=9000
sudo sysv-rc-conf
cd /srv
composer create-project laravel/laravel --prefer-dist
vi /etc/nginx/sites-enabled/laravel
=== /etc/nginx/sites-enabled/laravel ===
server {
listen 80 default_server;
root /srv/laravel/public;
index index.html index.htm index.php;
server_name laravel.app;
access_log /var/log/nginx/localhost.laravel-access.log;
error_log /var/log/nginx/locahost.laravel-error.log error;
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location = /favicon.ico { log_not_found off; access_log off; }
location = /robots.txt { log_not_found off; access_log off; }
error_page 404 /index.php;
include hhvm.conf; # The HHVM Magic Here
# Deny .htaccess file access
location ~ /\.ht {
deny all;
}
}
=== End of /etc/nginx/sites-enabled/laravel ===
rm /etc/nginx/sites-enabled/default
ln -s /etc/nginx/sites-enabled/laravel /etc/nginx/sites-available/laravel
service nginx restart