「インストール - Laravel」の版間の差分

ナビゲーションに移動 検索に移動
406行目: 406行目:
* MCrypt PHP拡張モジュールは動作可能かどうか確認する。
* MCrypt PHP拡張モジュールは動作可能かどうか確認する。
<br>
<br>
==== NginXを使用している場合 ====
Laravelでは、全てのリクエストをindex.phpにルーティングする。<br>
<br>
NginXでLaravelを使用する場合、<code>location /</code>ディレクティブに<code>try_files</code>ディレクティブが含まれている必要がある。<br>
これにより、Laravelのルーティングが正しく機能する。<br>
<br>
<syntaxhighlight lang="nginx">
# 例: NginXの設定例
# 1. リクエストは最初に rootディレクティブに指定されたディレクトリの同名ファイルを探す。
# 2. 見つからない場合は、index.phpにフォールバックして、Laravelのルーティングが処理する。
location / {
    root        /srv/www/htdocs/laravel_Project/public;
    index      index.php index.html index.htm;
    try_files  $uri $uri/ /index.php?$query_string;
}
location ~ \.php$
{
    fastcgi_pass  unix:/var/run/php-fpm/php-fpm.sock;
    fastcgi_index  index.php;
    include        fastcgi_params;
    fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
}
</syntaxhighlight>
<br><br>
== エラー関連 ==
== エラー関連 ==
==== swiftmailer/swiftmailerライブラリ ====
==== swiftmailer/swiftmailerライブラリ ====

案内メニュー