[LINUX] Commands that were important when building the Laravel environment in the Apache environment (Note)

I made settings around API authentication of Laravel under Apach environment

・ Installation of Passport

Console


conposer require laravel/passport

・ Register Passport with Laravel

Console


'providers' => [
                  :
        Laravel\Passport\PassportServiceProvider::class,
    ],

-Key generation and record insertion

Console


php artisan passport:install

· Roll back all database migrations first, then run the migrate command

Console


php artisan migration:reflesh

・ Execution of seed

Console


php artisan db:seed

-Generation of "Personal Access Client"

Console


php artisan passport:client --personal

->Enter the client name

Frequently visited directories

-If you do not change the ownership of this directory to the owner of the Laravel app, you will get a "Service Unavailable" error.

Console


$ ls -l /run/php-fpm/www.sock #Confirmation of authority
$ chown www:www /run/php-fpm/www.sock  #Change permissions

・ I want to see the error log of the Laravel environment! Here you can see the cause of the alternative error (maybe)

Console


#In the app's root directory
$ vi storage/logs/laravel

・ I often confirmed errors in the Apache environment here.

Console


$ cd /
$ vi /var/log/httpd/error_log

Reference site

https://www.wakuwakubank.com/posts/457-laravel-passport/

Recommended Posts

Commands that were important when building the Laravel environment in the Apache environment (Note)
This and that around Mysql in Apache environment (Note)
Various commands for building an environment with Apache
Precautions when installing packages in the conda environment
Note that I was addicted to npm script not passing in the verification environment
The story of building the fastest Linux environment in the world
About the contents of wscript when building a D language environment like that with Waf
[Note] List of basic commands for building python / conda environment
Commands often used in the development environment during Python implementation
A story that stumbled when using pip in a proxy environment
Precautions that must be understood when building a PYTHON environment
(Note) Django in Vagrant environment
The story that the Homebrew environment was blown away when Anaconda was installed