- PHP >= 7.1.3
- OpenSSL PHP Extension
- PDO PHP Extension
- Mbstring PHP Extension
- Tokenizer PHP Extension
- XML PHP Extension
- Ctype PHP Extension
- JSON PHP Extension
- BCMath PHP Extension
2. 就可以利用以下指令安裝laravel套件
composer global require laravel/installer
3. 切到你要放專案的目錄後,使用以下指令建立一個laravel專案
$HOME/.config/composer/vendor/bin/laravel new `專案名稱`
4. 記得將laravel專案底下的storage資料夾給予777權限
chmod -R 777 /usr/share/nginx/`專案名稱`/storage/
5. 將laravel專案設定一個virtual host
編輯/etc/nginx/conf.d/default.conf,依照個人需求以下設定
server {
listen 80;
server_name abowblog.abowspy.com;
root /usr/share/nginx/html/`專案名稱`/public;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php(/|$) {
root /usr/share/nginx/`專案名稱`/public;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}