sudo add-apt-repository ppa:ondrej/php -y
sudo apt-get update -y
sudo apt-get install php7.0-curl php7.0-cli php7.0-dev php7.0-gd php7.0-intl php7.0-mcrypt php7.0-json php7.0-mysql php7.0-opcache php7.0-bcmath php7.0-mbstring php7.0-soap php7.0-xml php7.0-zip php7.0-sqlite -y
sudo mv /etc/apache2/envvars /etc/apache2/envvars.bak
sudo apt-get remove libapache2-mod-php5 -y
sudo apt-get install libapache2-mod-php7.0 -y
sudo cp /etc/apache2/envvars.bak /etc/apache2/envvars
sudo curl -o /usr/local/bin/jq -L https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64 && sudo chmod +x /usr/local/bin/jq
$ composer create-project --prefer-dist laravel/laravel OtonaNoAttendance
$ sudo vim /etc/apache2/sites-enabled/001-cloud9.conf
# 変更前
<VirtualHost *:8080>
DocumentRoot /home/ubuntu/workspace
ServerName https://${C9_HOSTNAME}:443
LogLevel info
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory /home/ubuntu/workspace>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
ServerName https://${C9_HOSTNAME}
# 変更後
DocumentRoot /home/ubuntu/workspace/OtonaNoAttendance/public # この行を編集
0. PHP7のインストール
sudo add-apt-repository ppa:ondrej/php -y
sudo apt-get update -y
sudo apt-get install php7.0-curl php7.0-cli php7.0-dev php7.0-gd php7.0-intl php7.0-mcrypt php7.0-json php7.0-mysql php7.0-opcache php7.0-bcmath php7.0-mbstring php7.0-soap php7.0-xml php7.0-zip php7.0-sqlite -y
sudo mv /etc/apache2/envvars /etc/apache2/envvars.bak
sudo apt-get remove libapache2-mod-php5 -y
sudo apt-get install libapache2-mod-php7.0 -y
sudo cp /etc/apache2/envvars.bak /etc/apache2/envvars
sudo curl -o /usr/local/bin/jq -L https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64 && sudo chmod +x /usr/local/bin/jq
1. プロジェクトの作成
1.1 Laravelのダウンロード
$ composer create-project --prefer-dist laravel/laravel OtonaNoAttendance
1.2 Cloud9の環境を設定
$ sudo vim /etc/apache2/sites-enabled/001-cloud9.conf
# 変更前
<VirtualHost *:8080>
DocumentRoot /home/ubuntu/workspace
ServerName https://${C9_HOSTNAME}:443
LogLevel info
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory /home/ubuntu/workspace>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
ServerName https://${C9_HOSTNAME}
# 変更後
<VirtualHost *:8080>
DocumentRoot /home/ubuntu/workspace/OtonaNoAttendance/public # この行を編集
ServerName https://${C9_HOSTNAME}:443